* [PATCH] mfd: mt6397: convert to arch_initcall
@ 2015-12-23 9:25 Henry Chen
2016-01-11 5:49 ` Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Henry Chen @ 2015-12-23 9:25 UTC (permalink / raw)
To: linux-arm-kernel
Since pinctrl or regulator of mt6396 need to initialize earlier to avoid
probe deferring, also change the core driver to arch_init.
Signed-off-by: Henry Chen <henryc.chen@mediatek.com>
---
drivers/mfd/mt6397-core.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index 1749c1c..af98b4b 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
@@ -285,7 +285,11 @@ static struct platform_driver mt6397_driver = {
},
};
-module_platform_driver(mt6397_driver);
+static int __init mt6397_core_init(void)
+{
+ return platform_driver_register(&mt6397_driver);
+}
+arch_initcall(mt6397_core_init);
MODULE_AUTHOR("Flora Fu, MediaTek");
MODULE_DESCRIPTION("Driver for MediaTek MT6397 PMIC");
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] mfd: mt6397: convert to arch_initcall
2015-12-23 9:25 [PATCH] mfd: mt6397: convert to arch_initcall Henry Chen
@ 2016-01-11 5:49 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2016-01-11 5:49 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, 23 Dec 2015, Henry Chen wrote:
> Since pinctrl or regulator of mt6396 need to initialize earlier to avoid
> probe deferring, also change the core driver to arch_init.
This is exactly what deferring probe was designed for; so that you
don't have to mess around with initcall ordering.
> Signed-off-by: Henry Chen <henryc.chen@mediatek.com>
> ---
> drivers/mfd/mt6397-core.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
> index 1749c1c..af98b4b 100644
> --- a/drivers/mfd/mt6397-core.c
> +++ b/drivers/mfd/mt6397-core.c
> @@ -285,7 +285,11 @@ static struct platform_driver mt6397_driver = {
> },
> };
>
> -module_platform_driver(mt6397_driver);
> +static int __init mt6397_core_init(void)
> +{
> + return platform_driver_register(&mt6397_driver);
> +}
> +arch_initcall(mt6397_core_init);
>
> MODULE_AUTHOR("Flora Fu, MediaTek");
> MODULE_DESCRIPTION("Driver for MediaTek MT6397 PMIC");
--
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:[~2016-01-11 5:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-23 9:25 [PATCH] mfd: mt6397: convert to arch_initcall Henry Chen
2016-01-11 5:49 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).