* [PATCH] clk: s2mps11: initialize driver via module_platform_driver @ 2020-09-21 20:35 ` Krzysztof Kozlowski 2020-09-22 8:04 ` Marek Szyprowski 2020-09-22 19:31 ` Stephen Boyd 0 siblings, 2 replies; 3+ messages in thread From: Krzysztof Kozlowski @ 2020-09-21 20:35 UTC (permalink / raw) To: Sangbeom Kim, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Michael Turquette, Stephen Boyd, linux-kernel, linux-samsung-soc, linux-clk The driver was using subsys_initcall() because in old times deferred probe was not supported everywhere and specific ordering was needed. Since probe deferral works fine and specific ordering is discouraged (hides dependencies between drivers and couples their boot order), the driver can be converted to regular module_platform_driver. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> --- drivers/clk/clk-s2mps11.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index 2ce370c804aa..aa21371f9104 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -267,18 +267,7 @@ static struct platform_driver s2mps11_clk_driver = { .remove = s2mps11_clk_remove, .id_table = s2mps11_clk_id, }; - -static int __init s2mps11_clk_init(void) -{ - return platform_driver_register(&s2mps11_clk_driver); -} -subsys_initcall(s2mps11_clk_init); - -static void __exit s2mps11_clk_cleanup(void) -{ - platform_driver_unregister(&s2mps11_clk_driver); -} -module_exit(s2mps11_clk_cleanup); +module_platform_driver(s2mps11_clk_driver); MODULE_DESCRIPTION("S2MPS11 Clock Driver"); MODULE_AUTHOR("Yadwinder Singh Brar <yadi.brar@samsung.com>"); -- 2.17.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: s2mps11: initialize driver via module_platform_driver 2020-09-21 20:35 ` [PATCH] clk: s2mps11: initialize driver via module_platform_driver Krzysztof Kozlowski @ 2020-09-22 8:04 ` Marek Szyprowski 2020-09-22 19:31 ` Stephen Boyd 1 sibling, 0 replies; 3+ messages in thread From: Marek Szyprowski @ 2020-09-22 8:04 UTC (permalink / raw) To: Krzysztof Kozlowski, Sangbeom Kim, Bartlomiej Zolnierkiewicz, Michael Turquette, Stephen Boyd, linux-kernel, linux-samsung-soc, linux-clk Hi Krzysztof, On 21.09.2020 22:35, Krzysztof Kozlowski wrote: > The driver was using subsys_initcall() because in old times deferred > probe was not supported everywhere and specific ordering was needed. > Since probe deferral works fine and specific ordering is discouraged > (hides dependencies between drivers and couples their boot order), the > driver can be converted to regular module_platform_driver. > > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> > --- > drivers/clk/clk-s2mps11.c | 13 +------------ > 1 file changed, 1 insertion(+), 12 deletions(-) > > diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c > index 2ce370c804aa..aa21371f9104 100644 > --- a/drivers/clk/clk-s2mps11.c > +++ b/drivers/clk/clk-s2mps11.c > @@ -267,18 +267,7 @@ static struct platform_driver s2mps11_clk_driver = { > .remove = s2mps11_clk_remove, > .id_table = s2mps11_clk_id, > }; > - > -static int __init s2mps11_clk_init(void) > -{ > - return platform_driver_register(&s2mps11_clk_driver); > -} > -subsys_initcall(s2mps11_clk_init); > - > -static void __exit s2mps11_clk_cleanup(void) > -{ > - platform_driver_unregister(&s2mps11_clk_driver); > -} > -module_exit(s2mps11_clk_cleanup); > +module_platform_driver(s2mps11_clk_driver); > > MODULE_DESCRIPTION("S2MPS11 Clock Driver"); > MODULE_AUTHOR("Yadwinder Singh Brar <yadi.brar@samsung.com>"); Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: s2mps11: initialize driver via module_platform_driver 2020-09-21 20:35 ` [PATCH] clk: s2mps11: initialize driver via module_platform_driver Krzysztof Kozlowski 2020-09-22 8:04 ` Marek Szyprowski @ 2020-09-22 19:31 ` Stephen Boyd 1 sibling, 0 replies; 3+ messages in thread From: Stephen Boyd @ 2020-09-22 19:31 UTC (permalink / raw) To: Bartlomiej Zolnierkiewicz, Krzysztof Kozlowski, Michael Turquette, Sangbeom Kim, linux-clk, linux-kernel, linux-samsung-soc Quoting Krzysztof Kozlowski (2020-09-21 13:35:57) > The driver was using subsys_initcall() because in old times deferred > probe was not supported everywhere and specific ordering was needed. > Since probe deferral works fine and specific ordering is discouraged > (hides dependencies between drivers and couples their boot order), the > driver can be converted to regular module_platform_driver. > > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> > --- Applied to clk-next ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-22 19:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20200921203614eucas1p19b9203eb6bbd7b80647f7e48705c731a@eucas1p1.samsung.com>
2020-09-21 20:35 ` [PATCH] clk: s2mps11: initialize driver via module_platform_driver Krzysztof Kozlowski
2020-09-22 8:04 ` Marek Szyprowski
2020-09-22 19:31 ` Stephen Boyd
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox