Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751861AbdFEKa6 convert rfc822-to-8bit (ORCPT ); Mon, 5 Jun 2017 06:30:58 -0400 Received: from mail1.bemta3.messagelabs.com ([195.245.230.174]:18983 "EHLO mail1.bemta3.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751293AbdFEKa4 (ORCPT ); Mon, 5 Jun 2017 06:30:56 -0400 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrOKsWRWlGSWpSXmKPExsUSt3Opse4JI9N IgzfN4hbNLxoYLe5/PcpocXnXHDaLqfOPs1hc23uc2YHVY/blOewed67tYfOYvPAis8fnTXIe 67dsZQpgjWLNzEvKr0hgzfhy/gVTwS/ZiinfPrM2MM6R7GLk4hASWMIosfZxL3sXIycHm4Chx Lw37xlBbBEge9mbDawgRcwCjxklVmzdwgqSEBZwkTg2ay0LRJGrxKWlz6FsI4krf+4xgdgsAi oSr/Y+BYvzCgRIrN07HaiXA2hbhcTF/iyQMKeAk8Sl7RfAyhkFZCW+NK5mBrGZBcQlbj2ZDxa XEBCQWLLnPDOELSrx8vE/VghbXmLtrydQcXuJ1/fesYCMlxDQl+hrLIYIG0qsmnaABcI2l2j+ 38oOMV5HYsHuT2wQtrbEsoWvmSGuFJQ4OfMJywRG8VlIrpiFpGUWkpZZSFoWMLKsYlQvTi0qS y3StdRLKspMzyjJTczM0TU0MNbLTS0uTkxPzUlMKtZLzs/dxAiM1HoGBsYdjK9/Oh1ilORgUh LlXa1oGinEl5SfUpmRWJwRX1Sak1p8iFGGg0NJgneaIVBOsCg1PbUiLTMHmDJg0hIcPEoivF/ 0gdK8xQWJucWZ6RCpU4y6HCve7vrCJMSSl5+XKiXOewRkhgBIUUZpHtwIWPq6xCgrJczLyMDA IMRTkFqUm1mCKv+KUZyDUUmYtxZkCk9mXgncpldARzABHcF3yQTkiJJEhJRUA2OD3sPJTV6bn RuNv6vObU99Es2cHbxJbVnNm4/fBKR71/bGTgzrjZ4ikmGsGtBfoPCz681Hy01vf0kEiDWKyv 461Ju63ZNxpfHrtQd1GBXy/+X5evGtqDTpuGBm1bRMxbz1lcFZ/kdBBzszd+SduvhlpeO87I/ tcjfi0juOrzfzXlMzP9BWRImlOCPRUIu5qDgRADN88shaAwAA X-Env-Sender: stwiss.opensource@diasemi.com X-Msg-Ref: server-13.tower-217.messagelabs.com!1496658632!86580296!1 X-Originating-IP: [94.185.165.51] X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked From: Steve Twiss To: Paul Gortmaker CC: Support Opensource , Lee Jones , Eric Miao , Mike Rapoport , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH 1/4] mfd: da903x: Make it explicitly non-modular Thread-Topic: [PATCH 1/4] mfd: da903x: Make it explicitly non-modular Thread-Index: AQHS3Gn8zig4GbjI+0ifRYCMRb+YnaIWEobA Date: Mon, 5 Jun 2017 10:30:30 +0000 Message-ID: <6ED8E3B22081A4459DAC7699F3695FB7018CD91D68@SW-EX-MBX02.diasemi.com> References: <20170603130351.13913-1-paul.gortmaker@windriver.com> <20170603130351.13913-2-paul.gortmaker@windriver.com> In-Reply-To: <20170603130351.13913-2-paul.gortmaker@windriver.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.20.26.77] x-kse-attachmentfiltering-interceptor-info: protection disabled x-kse-serverinfo: sw-ex-cashub01.diasemi.com, 9 x-kse-antivirus-interceptor-info: scan successful x-kse-antivirus-info: Clean, bases: 05/06/2017 08:46:00 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3779 Lines: 120 Hi Paul, On 03 June 2017 14:04 Paul Gortmaker wrote: > To: linux-kernel@vger.kernel.org > Cc: Paul Gortmaker; Support Opensource; Lee Jones; Eric Miao; Mike Rapoport > Subject: [PATCH 1/4] mfd: da903x: Make it explicitly non-modular > > The Kconfig currently controlling compilation of this code is: > > drivers/mfd/Kconfig:config PMIC_DA903X > drivers/mfd/Kconfig: bool "Dialog Semiconductor DA9030/DA9034 PMIC > Support" > > ...meaning that it currently is not being built as a module by anyone. With regards to your four patches, [4/4] mfd: da9055-i2c: Make it explicitly non-modular - - - 2017-06-03 [3/4] mfd: da9055-core: make it explicitly non-modular - - - 2017-06-03 [2/4] mfd: da9052-*: Make it explicitly non-modular - - - 2017-06-03 [1/4] mfd: da903x: Make it explicitly non-modular - - - 2017-06-03 Is there an reason not to make the Kconfig tristate? Would that not be simpler? Previously, something similar was suggested by Geert Uytterhoeven for DA9063: https://patchwork.kernel.org/patch/7788001/ Regards, Steve > Remove the modular code that is essentially orphaned, so that > when reading the driver there is no doubt it is builtin-only. > > Also explicitly disallow a driver unbind, since that doesn't have a > sensible use case anyway, and it allows us to drop the ".remove" > code for non-modular drivers. > > Since module_init was not in use by this code, the init ordering > remains unchanged with this commit. > > We replace module.h with init.h and export.h ; the latter since this > file does export some syms. > > Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. > > We also delete the MODULE_LICENSE tag etc. since all that information > is already contained at the top of the file in the comments. > > Cc: Support Opensource > Cc: Lee Jones > Cc: Eric Miao > Cc: Mike Rapoport > Signed-off-by: Paul Gortmaker > --- > drivers/mfd/da903x.c | 26 +++----------------------- > 1 file changed, 3 insertions(+), 23 deletions(-) > > diff --git a/drivers/mfd/da903x.c b/drivers/mfd/da903x.c > index 09f367571c58..78edb0558a0f 100644 > --- a/drivers/mfd/da903x.c > +++ b/drivers/mfd/da903x.c > @@ -13,7 +13,7 @@ > */ > > #include > -#include > +#include > #include > #include > #include > @@ -446,7 +446,6 @@ static const struct i2c_device_id da903x_id_table[] = { > { "da9034", 1 }, > { }, > }; > -MODULE_DEVICE_TABLE(i2c, da903x_id_table); > > static int __remove_subdev(struct device *dev, void *unused) > { > @@ -535,20 +534,12 @@ static int da903x_probe(struct i2c_client *client, > return da903x_add_subdevs(chip, pdata); > } > > -static int da903x_remove(struct i2c_client *client) > -{ > - struct da903x_chip *chip = i2c_get_clientdata(client); > - > - da903x_remove_subdevs(chip); > - return 0; > -} > - > static struct i2c_driver da903x_driver = { > .driver = { > - .name = "da903x", > + .name = "da903x", > + .suppress_bind_attrs = true, > }, > .probe = da903x_probe, > - .remove = da903x_remove, > .id_table = da903x_id_table, > }; > > @@ -557,14 +548,3 @@ static int __init da903x_init(void) > return i2c_add_driver(&da903x_driver); > } > subsys_initcall(da903x_init); > - > -static void __exit da903x_exit(void) > -{ > - i2c_del_driver(&da903x_driver); > -} > -module_exit(da903x_exit); > - > -MODULE_DESCRIPTION("PMIC Driver for Dialog Semiconductor DA9034"); > -MODULE_AUTHOR("Eric Miao "); > -MODULE_AUTHOR("Mike Rapoport "); > -MODULE_LICENSE("GPL v2"); > -- > 2.11.0