From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751873AbbIKIlu (ORCPT ); Fri, 11 Sep 2015 04:41:50 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:55124 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751484AbbIKIlr (ORCPT ); Fri, 11 Sep 2015 04:41:47 -0400 From: Arnd Bergmann To: Chen Feng Cc: p.zabel@pengutronix.de, linux-kernel@vger.kernel.org, robh+dt@kernel.org, pawel.moll@arm.com, xuwei5@hisilicon.com, haojian.zhuang@linaro.org, zhangfei.gao@foxmail.com, xuyiping@hisilicon.com, bintian.wang@huawei.com, devicetree@vger.kernel.org, dan.zhao@hisilicon.com, suzhuangluan@hisilicon.com, w.f@huawei.com Subject: Re: [PATCH V2 3/3] reset: hi6220: Reset driver for hisilicon hi6220 SoC Date: Fri, 11 Sep 2015 10:41:24 +0200 Message-ID: <2464506.5Jp1Wg3qfc@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1441959518-178696-3-git-send-email-puck.chen@hisilicon.com> References: <1441959518-178696-1-git-send-email-puck.chen@hisilicon.com> <1441959518-178696-3-git-send-email-puck.chen@hisilicon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:9Hf32gRYokr9cMdoEX4jaRPeMQm12qN0qk77yPsBcLhXTd4AeyL N0WLZQeM34o0UbtjdTkwekyKhxvh+Hbc+Apazf5bXul2wuAphh8JEq9cCZ8931cSV13rZkp S/W0oCH8EEoaKvr4tartzMkf1tFOxy9kivfhPMS0ZQ1GZnPGpI2mgNstxzc2hmM41tiSsvJ 8z1zFsgTbucinSaLv1IHQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:xDyHjwMfrhA=:IbTCqhTlcXNmpJsxwljK4v kzSySAwC3Wh/JtFdGskjgBL1943u+ECad6dPdLpDPiuDiDCBugoVTw/CUoyiwkowrAZnQxUYj kJRYLcAg9Clx8bFkrM2nVKP9+hZnO82Y8LDKWHnU6b6cF0J+W065k/LJDbrnVX2ZUosTNM5Ep vUS0HE83PWVC/qjk2G9FIX2GMNLV8ivp3tKAngKgVMtY8wEcJ+MSYqO5IRqdmlSVSAUlIbuFA aTgAHOjtt6yAP7GMIPzwo6RyakGG72ZeGZ7R3zjcuYFWSDU1LplCiXnZOEOoRa3dCG+G1mAKv /JFd7ehcdXBPH0e1K+xlnlRGI63ddRLq0ZZViZTXeoSpk5wAs0KBrq4f+9nkkzK4rxSVEK/U4 KWxVLoLeNloJWlPbfZGkSTwsgZtEyPbqBpegQIt6Kz1c58hISg0d7hSOaLzz/xaGcxRnF3FYG IGgqbg9HuSsopaJsPYfffrF2q+A+CMgRT1HNudi2xnU8VaZVOtKLGJUOFJr6ph/42fTiRn3eG JHOvTKst2w7/C/7GfOjPZmdlh6fz2hVjuPGxBF5OPvbHAMxfd3V8r5YLeld5qxBE3+LIeTf1z paUQ2Bk54XruTQ9AAoovs7YLTegRwt01GXIUb/VSGJnudu9A3/7cnd/3/JV8mT+KfdRyJcM/y M6BYzGiJjbPj3I6x4UGUyYYkN8+DsbR44yyWk8D3qoCli7XfAa8L3v0/N+RBhCkW/0nS3OWV5 tSSbaXJIqds14M2c Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > + 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. Arnd