summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/max77686-regulator.c
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@osg.samsung.com>2016-04-06 09:49:47 -0400
committerMark Brown <broonie@kernel.org>2016-04-06 10:12:26 -0700
commit314a8203b6de2df164399996ece1412ae8f6270d (patch)
treeeebd1462e9b0fc0d335b960902330b76e0626af6 /drivers/regulator/max77686-regulator.c
parentf55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff)
downloadop-kernel-dev-314a8203b6de2df164399996ece1412ae8f6270d.zip
op-kernel-dev-314a8203b6de2df164399996ece1412ae8f6270d.tar.gz
regulator: max77686: 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: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/max77686-regulator.c')
-rw-r--r--drivers/regulator/max77686-regulator.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/regulator/max77686-regulator.c b/drivers/regulator/max77686-regulator.c
index 17ccf36..d1ab6a4 100644
--- a/drivers/regulator/max77686-regulator.c
+++ b/drivers/regulator/max77686-regulator.c
@@ -553,17 +553,7 @@ static struct platform_driver max77686_pmic_driver = {
.id_table = max77686_pmic_id,
};
-static int __init max77686_pmic_init(void)
-{
- return platform_driver_register(&max77686_pmic_driver);
-}
-subsys_initcall(max77686_pmic_init);
-
-static void __exit max77686_pmic_cleanup(void)
-{
- platform_driver_unregister(&max77686_pmic_driver);
-}
-module_exit(max77686_pmic_cleanup);
+module_platform_driver(max77686_pmic_driver);
MODULE_DESCRIPTION("MAXIM 77686 Regulator Driver");
MODULE_AUTHOR("Chiwoong Byun <woong.byun@samsung.com>");
OpenPOWER on IntegriCloud