aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/clk/clk-s2mps11.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2020-09-21 22:35:57 +0200
committerStephen Boyd <sboyd@kernel.org>2020-09-22 12:30:52 -0700
commit533852d71840a5f8b0cfa6ad8027e6493ea0cc7b (patch)
treea2023d35607af6b711d0bc74a93bf2552ec944e2 /drivers/clk/clk-s2mps11.c
parentMerge tag 'clk-v5.10-samsung' of https://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk into clk-samsung (diff)
downloadwireguard-linux-533852d71840a5f8b0cfa6ad8027e6493ea0cc7b.tar.xz
wireguard-linux-533852d71840a5f8b0cfa6ad8027e6493ea0cc7b.zip
clk: s2mps11: initialize driver via module_platform_driver
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> Link: https://lore.kernel.org/r/20200921203558.19554-1-krzk@kernel.org Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/clk-s2mps11.c')
-rw-r--r--drivers/clk/clk-s2mps11.c13
1 files changed, 1 insertions, 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>");