Commit 5ab3c494 authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Mark Brown

regulator: s2mps11: Use module_platform_driver() instead subsys initcall

The driver's init and exit function don't do anything besides registering
and unregistering the platform driver, so the module_platform_driver()
macro could just be used instead of having separate functions.

Currently the macro is not being used because the driver is initialized at
subsys init call level but this isn't necessary since consumer devices are
defined in the DT as dependencies so there's no need for init calls order.
Signed-off-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f55532a0
...@@ -1221,17 +1221,7 @@ static struct platform_driver s2mps11_pmic_driver = { ...@@ -1221,17 +1221,7 @@ static struct platform_driver s2mps11_pmic_driver = {
.id_table = s2mps11_pmic_id, .id_table = s2mps11_pmic_id,
}; };
static int __init s2mps11_pmic_init(void) module_platform_driver(s2mps11_pmic_driver);
{
return platform_driver_register(&s2mps11_pmic_driver);
}
subsys_initcall(s2mps11_pmic_init);
static void __exit s2mps11_pmic_exit(void)
{
platform_driver_unregister(&s2mps11_pmic_driver);
}
module_exit(s2mps11_pmic_exit);
/* Module information */ /* Module information */
MODULE_AUTHOR("Sangbeom Kim <sbkim73@samsung.com>"); MODULE_AUTHOR("Sangbeom Kim <sbkim73@samsung.com>");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment