From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755269AbcFQH0L (ORCPT ); Fri, 17 Jun 2016 03:26:11 -0400 Received: from bear.ext.ti.com ([198.47.19.11]:32775 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753942AbcFQH0K (ORCPT ); Fri, 17 Jun 2016 03:26:10 -0400 Subject: Re: [PATCH 3/6] memory: omap-gpmc: make it explicitly non-modular To: Paul Gortmaker , References: <20160617003748.12188-1-paul.gortmaker@windriver.com> <20160617003748.12188-4-paul.gortmaker@windriver.com> CC: Tony Lindgren , From: Roger Quadros Message-ID: <5763A60A.1010101@ti.com> Date: Fri, 17 Jun 2016 10:26:02 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20160617003748.12188-4-paul.gortmaker@windriver.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, On 17/06/16 03:37, Paul Gortmaker wrote: > The Kconfig currently controlling compilation of this code is: > > drivers/memory/Kconfig:config OMAP_GPMC > drivers/memory/Kconfig: bool > > ...meaning that it currently is not being built as a module by anyone. > > Lets remove the modular code that is essentially orphaned, so that > when reading the driver there is no doubt it is builtin-only. > > Since module_init was not in use by this code, the init ordering > remains unchanged with this commit. > > Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. > > We don't replace module.h with init.h since the file already has that. > > Cc: Roger Quadros > Cc: Tony Lindgren > Cc: linux-omap@vger.kernel.org > Signed-off-by: Paul Gortmaker Looks fine to me. omap-gpmc.c be a module till code from arch/arm/mach-omap2/ stops calling directly into it. I will queue this up for v4.8. Thanks. > --- > drivers/memory/omap-gpmc.c | 10 ---------- > 1 file changed, 10 deletions(-) > > diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c > index af4884ba6b7c..827832ac0b8c 100644 > --- a/drivers/memory/omap-gpmc.c > +++ b/drivers/memory/omap-gpmc.c > @@ -20,7 +20,6 @@ > #include > #include > #include > -#include > #include > #include > #include > @@ -1807,7 +1806,6 @@ static const struct of_device_id gpmc_dt_ids[] = { > { .compatible = "ti,am3352-gpmc" }, /* am335x devices */ > { } > }; > -MODULE_DEVICE_TABLE(of, gpmc_dt_ids); > > /** > * gpmc_read_settings_dt - read gpmc settings from device-tree > @@ -2437,15 +2435,7 @@ static __init int gpmc_init(void) > { > return platform_driver_register(&gpmc_driver); > } > - > -static __exit void gpmc_exit(void) > -{ > - platform_driver_unregister(&gpmc_driver); > - > -} > - > postcore_initcall(gpmc_init); > -module_exit(gpmc_exit); > > static struct omap3_gpmc_regs gpmc_context; > > -- cheers, -roger