Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1424554 > unrolled thread
| Started by | Paul Gortmaker <paul.gortmaker@windriver.com> |
|---|---|
| First post | 2016-06-17 02:40 +0200 |
| Last post | 2016-06-17 09:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 3/6] memory: omap-gpmc: make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-06-17 02:40 +0200
Re: [PATCH 3/6] memory: omap-gpmc: make it explicitly non-modular Roger Quadros <rogerq@ti.com> - 2016-06-17 09:30 +0200
| From | Paul Gortmaker <paul.gortmaker@windriver.com> |
|---|---|
| Date | 2016-06-17 02:40 +0200 |
| Subject | [PATCH 3/6] memory: omap-gpmc: make it explicitly non-modular |
| Message-ID | <rKPZf-7Fj-3@gated-at.bofh.it> |
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>
---
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;
--
2.8.4
[toc] | [next] | [standalone]
| From | Roger Quadros <rogerq@ti.com> |
|---|---|
| Date | 2016-06-17 09:30 +0200 |
| Message-ID | <rKWo1-3vB-11@gated-at.bofh.it> |
| In reply to | #1424554 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web