Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1424555 > unrolled thread
| Started by | Paul Gortmaker <paul.gortmaker@windriver.com> |
|---|---|
| First post | 2016-06-17 02:40 +0200 |
| Last post | 2016-06-20 10:00 +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 5/6] memory: samsung/exynos-srom: make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-06-17 02:40 +0200
Re: [PATCH 5/6] memory: samsung/exynos-srom: make it explicitly non-modular Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-20 10:00 +0200
| From | Paul Gortmaker <paul.gortmaker@windriver.com> |
|---|---|
| Date | 2016-06-17 02:40 +0200 |
| Subject | [PATCH 5/6] memory: samsung/exynos-srom: make it explicitly non-modular |
| Message-ID | <rKPZf-7Fj-11@gated-at.bofh.it> |
The Kconfig currently controlling compilation of this code is:
memory/samsung/Kconfig:config EXYNOS_SROM
memory/samsung/Kconfig: bool "Exynos SROM controller driver" if COMPILE_TEST
...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.
We 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_platform_driver() uses the same init level priority as
builtin_platform_driver() the init ordering remains unchanged with
this commit.
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: Pankaj Dubey <pankaj.dubey@samsung.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/memory/samsung/exynos-srom.c | 21 +++------------------
1 file changed, 3 insertions(+), 18 deletions(-)
diff --git a/drivers/memory/samsung/exynos-srom.c b/drivers/memory/samsung/exynos-srom.c
index 96756fb4d6bd..b8904e33d3dd 100644
--- a/drivers/memory/samsung/exynos-srom.c
+++ b/drivers/memory/samsung/exynos-srom.c
@@ -11,7 +11,7 @@
*/
#include <linux/io.h>
-#include <linux/module.h>
+#include <linux/init.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
@@ -159,16 +159,6 @@ static int exynos_srom_probe(struct platform_device *pdev)
return of_platform_populate(np, NULL, NULL, dev);
}
-static int exynos_srom_remove(struct platform_device *pdev)
-{
- struct exynos_srom *srom = platform_get_drvdata(pdev);
-
- kfree(srom->reg_offset);
- iounmap(srom->reg_base);
-
- return 0;
-}
-
#ifdef CONFIG_PM_SLEEP
static void exynos_srom_save(void __iomem *base,
struct exynos_srom_reg_dump *rd,
@@ -211,21 +201,16 @@ static const struct of_device_id of_exynos_srom_ids[] = {
},
{},
};
-MODULE_DEVICE_TABLE(of, of_exynos_srom_ids);
static SIMPLE_DEV_PM_OPS(exynos_srom_pm_ops, exynos_srom_suspend, exynos_srom_resume);
static struct platform_driver exynos_srom_driver = {
.probe = exynos_srom_probe,
- .remove = exynos_srom_remove,
.driver = {
.name = "exynos-srom",
.of_match_table = of_exynos_srom_ids,
.pm = &exynos_srom_pm_ops,
+ .suppress_bind_attrs = true,
},
};
-module_platform_driver(exynos_srom_driver);
-
-MODULE_AUTHOR("Pankaj Dubey <pankaj.dubey@samsung.com>");
-MODULE_DESCRIPTION("Exynos SROM Controller Driver");
-MODULE_LICENSE("GPL");
+builtin_platform_driver(exynos_srom_driver);
--
2.8.4
[toc] | [next] | [standalone]
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Date | 2016-06-20 10:00 +0200 |
| Subject | Re: [PATCH 5/6] memory: samsung/exynos-srom: make it explicitly non-modular |
| Message-ID | <rM2hH-5qN-21@gated-at.bofh.it> |
| In reply to | #1424555 |
On 06/17/2016 02:37 AM, Paul Gortmaker wrote: > The Kconfig currently controlling compilation of this code is: > > memory/samsung/Kconfig:config EXYNOS_SROM > memory/samsung/Kconfig: bool "Exynos SROM controller driver" if COMPILE_TEST > > ...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. > > We 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_platform_driver() uses the same init level priority as > builtin_platform_driver() the init ordering remains unchanged with > this commit. > > 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: Pankaj Dubey <pankaj.dubey@samsung.com> > Cc: Kukjin Kim <kgene@kernel.org> > Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com> > Cc: linux-samsung-soc@vger.kernel.org > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> > --- > drivers/memory/samsung/exynos-srom.c | 21 +++------------------ > 1 file changed, 3 insertions(+), 18 deletions(-) Thanks, applied for v4.8. Best regards, Krzysztof
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web