Commit 533852d7 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Stephen Boyd
Browse files

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: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200921203558.19554-1-krzk@kernel.org


Tested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 553be99d
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -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>");