Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1424556 > unrolled thread
| Started by | Paul Gortmaker <paul.gortmaker@windriver.com> |
|---|---|
| First post | 2016-06-17 02:40 +0200 |
| Last post | 2016-06-21 17:40 +0200 |
| Articles | 3 — 3 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 1/6] memory: atmel-sdramc: make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-06-17 02:40 +0200
Re: [PATCH 1/6] memory: atmel-sdramc: make it explicitly non-modular Nicolas Ferre <nicolas.ferre@atmel.com> - 2016-06-17 09:40 +0200
Re: [PATCH 1/6] memory: atmel-sdramc: make it explicitly non-modular Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-06-21 17:40 +0200
| From | Paul Gortmaker <paul.gortmaker@windriver.com> |
|---|---|
| Date | 2016-06-17 02:40 +0200 |
| Subject | [PATCH 1/6] memory: atmel-sdramc: make it explicitly non-modular |
| Message-ID | <rKPZf-7Fj-13@gated-at.bofh.it> |
The Kconfig for this option is currently:
config ATMEL_SDRAMC
bool "Atmel (Multi-port DDR-)SDRAM Controller"
...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modularity, so that when reading the
driver there is no doubt it is builtin-only.
Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit. An
alternate init level might be worth considering at a later date.
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
was (or is now) contained at the top of the file in the comments.
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/memory/atmel-sdramc.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/memory/atmel-sdramc.c b/drivers/memory/atmel-sdramc.c
index a3ebc8a87479..53a341f3b305 100644
--- a/drivers/memory/atmel-sdramc.c
+++ b/drivers/memory/atmel-sdramc.c
@@ -1,6 +1,8 @@
/*
* Atmel (Multi-port DDR-)SDRAM Controller driver
*
+ * Author: Alexandre Belloni <alexandre.belloni@free-electrons.com>
+ *
* Copyright (C) 2014 Atmel
*
* This program is free software: you can redistribute it and/or modify
@@ -20,7 +22,7 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/kernel.h>
-#include <linux/module.h>
+#include <linux/init.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
@@ -48,7 +50,6 @@ static const struct of_device_id atmel_ramc_of_match[] = {
{ .compatible = "atmel,sama5d3-ddramc", .data = &sama5d3_caps, },
{},
};
-MODULE_DEVICE_TABLE(of, atmel_ramc_of_match);
static int atmel_ramc_probe(struct platform_device *pdev)
{
@@ -90,8 +91,4 @@ static int __init atmel_ramc_init(void)
{
return platform_driver_register(&atmel_ramc_driver);
}
-module_init(atmel_ramc_init);
-
-MODULE_LICENSE("GPL v2");
-MODULE_AUTHOR("Alexandre Belloni <alexandre.belloni@free-electrons.com>");
-MODULE_DESCRIPTION("Atmel (Multi-port DDR-)SDRAM Controller");
+device_initcall(atmel_ramc_init);
--
2.8.4
[toc] | [next] | [standalone]
| From | Nicolas Ferre <nicolas.ferre@atmel.com> |
|---|---|
| Date | 2016-06-17 09:40 +0200 |
| Message-ID | <rKWxI-3yM-19@gated-at.bofh.it> |
| In reply to | #1424556 |
Le 17/06/2016 02:37, Paul Gortmaker a écrit :
> The Kconfig for this option is currently:
>
> config ATMEL_SDRAMC
> bool "Atmel (Multi-port DDR-)SDRAM Controller"
>
> ...meaning that it currently is not being built as a module by anyone.
> Lets remove the couple traces of modularity, so that when reading the
> driver there is no doubt it is builtin-only.
>
> Since module_init translates to device_initcall in the non-modular
> case, the init ordering remains unchanged with this commit. An
> alternate init level might be worth considering at a later date.
>
> 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
> was (or is now) contained at the top of the file in the comments.
>
> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
> drivers/memory/atmel-sdramc.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/memory/atmel-sdramc.c b/drivers/memory/atmel-sdramc.c
> index a3ebc8a87479..53a341f3b305 100644
> --- a/drivers/memory/atmel-sdramc.c
> +++ b/drivers/memory/atmel-sdramc.c
> @@ -1,6 +1,8 @@
> /*
> * Atmel (Multi-port DDR-)SDRAM Controller driver
> *
> + * Author: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> + *
> * Copyright (C) 2014 Atmel
> *
> * This program is free software: you can redistribute it and/or modify
> @@ -20,7 +22,7 @@
> #include <linux/clk.h>
> #include <linux/err.h>
> #include <linux/kernel.h>
> -#include <linux/module.h>
> +#include <linux/init.h>
> #include <linux/of_platform.h>
> #include <linux/platform_device.h>
>
> @@ -48,7 +50,6 @@ static const struct of_device_id atmel_ramc_of_match[] = {
> { .compatible = "atmel,sama5d3-ddramc", .data = &sama5d3_caps, },
> {},
> };
> -MODULE_DEVICE_TABLE(of, atmel_ramc_of_match);
>
> static int atmel_ramc_probe(struct platform_device *pdev)
> {
> @@ -90,8 +91,4 @@ static int __init atmel_ramc_init(void)
> {
> return platform_driver_register(&atmel_ramc_driver);
> }
> -module_init(atmel_ramc_init);
> -
> -MODULE_LICENSE("GPL v2");
> -MODULE_AUTHOR("Alexandre Belloni <alexandre.belloni@free-electrons.com>");
> -MODULE_DESCRIPTION("Atmel (Multi-port DDR-)SDRAM Controller");
> +device_initcall(atmel_ramc_init);
>
--
Nicolas Ferre
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2016-06-21 17:40 +0200 |
| Message-ID | <rMvWq-7DO-7@gated-at.bofh.it> |
| In reply to | #1424556 |
On 16/06/2016 at 20:37:43 -0400, Paul Gortmaker wrote : > The Kconfig for this option is currently: > > config ATMEL_SDRAMC > bool "Atmel (Multi-port DDR-)SDRAM Controller" > > ...meaning that it currently is not being built as a module by anyone. > Lets remove the couple traces of modularity, so that when reading the > driver there is no doubt it is builtin-only. > > Since module_init translates to device_initcall in the non-modular > case, the init ordering remains unchanged with this commit. An > alternate init level might be worth considering at a later date. > > 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 > was (or is now) contained at the top of the file in the comments. > > Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> > Cc: Nicolas Ferre <nicolas.ferre@atmel.com> > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> > --- > drivers/memory/atmel-sdramc.c | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web