From: Roger Quadros <rogerq@ti.com>
To: Paul Gortmaker <paul.gortmaker@windriver.com>,
linux-kernel@vger.kernel.org
Cc: Tony Lindgren <tony@atomide.com>, linux-omap@vger.kernel.org
Subject: Re: [PATCH 3/6] memory: omap-gpmc: make it explicitly non-modular
Date: Fri, 17 Jun 2016 10:26:02 +0300 [thread overview]
Message-ID: <5763A60A.1010101@ti.com> (raw)
In-Reply-To: <20160617003748.12188-4-paul.gortmaker@windriver.com>
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 <rogerq@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: linux-omap@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
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 <linux/ioport.h>
> #include <linux/spinlock.h>
> #include <linux/io.h>
> -#include <linux/module.h>
> #include <linux/gpio/driver.h>
> #include <linux/interrupt.h>
> #include <linux/irqdomain.h>
> @@ -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
WARNING: multiple messages have this Message-ID (diff)
From: Roger Quadros <rogerq@ti.com>
To: Paul Gortmaker <paul.gortmaker@windriver.com>,
<linux-kernel@vger.kernel.org>
Cc: Tony Lindgren <tony@atomide.com>, <linux-omap@vger.kernel.org>
Subject: Re: [PATCH 3/6] memory: omap-gpmc: make it explicitly non-modular
Date: Fri, 17 Jun 2016 10:26:02 +0300 [thread overview]
Message-ID: <5763A60A.1010101@ti.com> (raw)
In-Reply-To: <20160617003748.12188-4-paul.gortmaker@windriver.com>
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 <rogerq@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: linux-omap@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
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 <linux/ioport.h>
> #include <linux/spinlock.h>
> #include <linux/io.h>
> -#include <linux/module.h>
> #include <linux/gpio/driver.h>
> #include <linux/interrupt.h>
> #include <linux/irqdomain.h>
> @@ -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
next prev parent reply other threads:[~2016-06-17 7:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-17 0:37 [PATCH 0/6] memory: remove modular usage from non-modular drivers Paul Gortmaker
2016-06-17 0:37 ` Paul Gortmaker
2016-06-17 0:37 ` [PATCH 1/6] memory: atmel-sdramc: make it explicitly non-modular Paul Gortmaker
2016-06-17 7:30 ` Nicolas Ferre
2016-06-21 15:17 ` Alexandre Belloni
2016-06-17 0:37 ` [PATCH 2/6] memory: mvebu-devbus: " Paul Gortmaker
2016-06-17 0:37 ` [PATCH 3/6] memory: omap-gpmc: " Paul Gortmaker
2016-06-17 0:37 ` Paul Gortmaker
2016-06-17 7:26 ` Roger Quadros [this message]
2016-06-17 7:26 ` Roger Quadros
[not found] ` <20160617003748.12188-1-paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
2016-06-17 0:37 ` [PATCH 4/6] memory: tegra20-mc: " Paul Gortmaker
2016-06-17 0:37 ` Paul Gortmaker
2016-06-17 0:37 ` [PATCH 5/6] memory: samsung/exynos-srom: " Paul Gortmaker
2016-06-17 0:37 ` Paul Gortmaker
2016-06-20 7:50 ` Krzysztof Kozlowski
2016-06-17 0:37 ` [PATCH 6/6] memory: atmel-ebi: " Paul Gortmaker
2016-06-17 7:35 ` Nicolas Ferre
2016-06-17 7:38 ` Boris Brezillon
2016-06-21 15:18 ` Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5763A60A.1010101@ti.com \
--to=rogerq@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.