From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753759AbbINCC2 (ORCPT ); Sun, 13 Sep 2015 22:02:28 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:58045 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753369AbbINCC0 (ORCPT ); Sun, 13 Sep 2015 22:02:26 -0400 Subject: Re: [PATCH V2 3/3] reset: hi6220: Reset driver for hisilicon hi6220 SoC To: Arnd Bergmann References: <1441959518-178696-1-git-send-email-puck.chen@hisilicon.com> <1441959518-178696-3-git-send-email-puck.chen@hisilicon.com> <2464506.5Jp1Wg3qfc@wuerfel> CC: , , , , , , , , , , , , From: chenfeng Message-ID: <55F62A98.7000205@hisilicon.com> Date: Mon, 14 Sep 2015 10:02:00 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <2464506.5Jp1Wg3qfc@wuerfel> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.142.192.172] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/9/11 16:41, Arnd Bergmann wrote: > On Friday 11 September 2015 16:18:38 Chen Feng wrote: >> +static int __init hi6220_reset_init(void) >> +{ >> + int ret; >> + struct device_node *np; >> + struct hi6220_reset_data *data; >> + >> + data = kzalloc(sizeof(*data), GFP_KERNEL); >> + if (!data) >> + return -ENOMEM; >> + >> + np = of_find_compatible_node(NULL, NULL, "hisilicon,hi6220_reset_ctl"); >> + if (!np) { >> + ret = -ENXIO; >> + goto err_alloc; >> + } > > Why is this not a platform driver? > OK,I will change this to a platform driver. >> + if (IS_ENABLED(CONFIG_RESET_CONTROLLER)) >> + reset_controller_register(&data->rc_dev); >> + >> + return 0; > > The Kconfig symbol already depends on RESET_CONTROLLER, so > the IS_ENABLED() check looks redundant. > Yes,agree with you. > Arnd > > . >