diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-06-16 20:37:47 -0400 |
---|---|---|
committer | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2016-06-20 03:48:59 -0400 |
commit | 58f388bcf011b47040378754cbe25118f7942151 (patch) | |
tree | 8bc66314ba8c71c7d514dafbde798cbc2ecf1fe8 | |
parent | cbf73175ebcee4d705cfcb1a467b6bdc893dea36 (diff) |
memory: samsung: exynos-srom: make it explicitly non-modular
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>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
-rw-r--r-- | drivers/memory/samsung/exynos-srom.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/drivers/memory/samsung/exynos-srom.c b/drivers/memory/samsung/exynos-srom.c index 5714bdf447fa..067f53324901 100644 --- a/drivers/memory/samsung/exynos-srom.c +++ b/drivers/memory/samsung/exynos-srom.c | |||
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | #include <linux/module.h> | 14 | #include <linux/init.h> |
15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
16 | #include <linux/of_address.h> | 16 | #include <linux/of_address.h> |
17 | #include <linux/of_platform.h> | 17 | #include <linux/of_platform.h> |
@@ -159,16 +159,6 @@ static int exynos_srom_probe(struct platform_device *pdev) | |||
159 | return of_platform_populate(np, NULL, NULL, dev); | 159 | return of_platform_populate(np, NULL, NULL, dev); |
160 | } | 160 | } |
161 | 161 | ||
162 | static int exynos_srom_remove(struct platform_device *pdev) | ||
163 | { | ||
164 | struct exynos_srom *srom = platform_get_drvdata(pdev); | ||
165 | |||
166 | kfree(srom->reg_offset); | ||
167 | iounmap(srom->reg_base); | ||
168 | |||
169 | return 0; | ||
170 | } | ||
171 | |||
172 | #ifdef CONFIG_PM_SLEEP | 162 | #ifdef CONFIG_PM_SLEEP |
173 | static void exynos_srom_save(void __iomem *base, | 163 | static void exynos_srom_save(void __iomem *base, |
174 | struct exynos_srom_reg_dump *rd, | 164 | struct exynos_srom_reg_dump *rd, |
@@ -211,21 +201,16 @@ static const struct of_device_id of_exynos_srom_ids[] = { | |||
211 | }, | 201 | }, |
212 | {}, | 202 | {}, |
213 | }; | 203 | }; |
214 | MODULE_DEVICE_TABLE(of, of_exynos_srom_ids); | ||
215 | 204 | ||
216 | static SIMPLE_DEV_PM_OPS(exynos_srom_pm_ops, exynos_srom_suspend, exynos_srom_resume); | 205 | static SIMPLE_DEV_PM_OPS(exynos_srom_pm_ops, exynos_srom_suspend, exynos_srom_resume); |
217 | 206 | ||
218 | static struct platform_driver exynos_srom_driver = { | 207 | static struct platform_driver exynos_srom_driver = { |
219 | .probe = exynos_srom_probe, | 208 | .probe = exynos_srom_probe, |
220 | .remove = exynos_srom_remove, | ||
221 | .driver = { | 209 | .driver = { |
222 | .name = "exynos-srom", | 210 | .name = "exynos-srom", |
223 | .of_match_table = of_exynos_srom_ids, | 211 | .of_match_table = of_exynos_srom_ids, |
224 | .pm = &exynos_srom_pm_ops, | 212 | .pm = &exynos_srom_pm_ops, |
213 | .suppress_bind_attrs = true, | ||
225 | }, | 214 | }, |
226 | }; | 215 | }; |
227 | module_platform_driver(exynos_srom_driver); | 216 | builtin_platform_driver(exynos_srom_driver); |
228 | |||
229 | MODULE_AUTHOR("Pankaj Dubey <pankaj.dubey@samsung.com>"); | ||
230 | MODULE_DESCRIPTION("Exynos SROM Controller Driver"); | ||
231 | MODULE_LICENSE("GPL"); | ||