* [PATCH] mfd: syscon: Use module_platform_driver()
@ 2014-06-09 14:34 Kefeng Wang
2014-06-16 9:14 ` Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Kefeng Wang @ 2014-06-09 14:34 UTC (permalink / raw)
To: Samuel Ortiz, Lee Jones; +Cc: linux-kernel
Convert to module_platform_drive() to eliminate boilerplate code.
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
drivers/mfd/syscon.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index ca15878..6c2c874 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -173,17 +173,7 @@ static struct platform_driver syscon_driver = {
.id_table = syscon_ids,
};
-static int __init syscon_init(void)
-{
- return platform_driver_register(&syscon_driver);
-}
-postcore_initcall(syscon_init);
-
-static void __exit syscon_exit(void)
-{
- platform_driver_unregister(&syscon_driver);
-}
-module_exit(syscon_exit);
+module_platform_driver(syscon_driver)
MODULE_AUTHOR("Dong Aisheng <dong.aisheng@linaro.org>");
MODULE_DESCRIPTION("System Control driver");
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mfd: syscon: Use module_platform_driver()
2014-06-09 14:34 [PATCH] mfd: syscon: Use module_platform_driver() Kefeng Wang
@ 2014-06-16 9:14 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2014-06-16 9:14 UTC (permalink / raw)
To: Kefeng Wang; +Cc: Samuel Ortiz, linux-kernel
On Mon, 09 Jun 2014, Kefeng Wang wrote:
> Convert to module_platform_drive() to eliminate boilerplate code.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
> drivers/mfd/syscon.c | 12 +-----------
> 1 files changed, 1 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
> index ca15878..6c2c874 100644
> --- a/drivers/mfd/syscon.c
> +++ b/drivers/mfd/syscon.c
> @@ -173,17 +173,7 @@ static struct platform_driver syscon_driver = {
> .id_table = syscon_ids,
> };
>
> -static int __init syscon_init(void)
> -{
> - return platform_driver_register(&syscon_driver);
> -}
> -postcore_initcall(syscon_init);
> -
> -static void __exit syscon_exit(void)
> -{
> - platform_driver_unregister(&syscon_driver);
> -}
> -module_exit(syscon_exit);
> +module_platform_driver(syscon_driver)
You have changed the initialisation semantics of quite an important
driver here. Initialising with postcore_initcall() is not so boiler
plate and swapping it out for a module_init() as you're doing with
this patch will probably break some systems.
> MODULE_AUTHOR("Dong Aisheng <dong.aisheng@linaro.org>");
> MODULE_DESCRIPTION("System Control driver");
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-16 9:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-09 14:34 [PATCH] mfd: syscon: Use module_platform_driver() Kefeng Wang
2014-06-16 9:14 ` Lee Jones
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.