Skip to contentSkip to conversation

regulator: wm8994: Convert to module_platform_driver()

PATCH New Mark Brown 1 participant 1 message Apr 4, 2013

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 regulator: wm8994: Convert to module_platform_driver()

The regulators can only be used to supply the CODEC so we don't need to worry about users that still need fudges for init ordering issues.

---
 drivers/regulator/wm8994-regulator.c |   18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)
drivers/regulator/wm8994-regulator.c +1 -17
index 6ff8723..5115881 100644
@@ -162,23 +162,7 @@ static struct platform_driver wm8994_ldo_driver = {
 	},
 };
 
-static int __init wm8994_ldo_init(void)
-{
-	int ret;
-
-	ret = platform_driver_register(&wm8994_ldo_driver);
-	if (ret != 0)
-		pr_err("Failed to register Wm8994 GP LDO driver: %d\n", ret);
-
-	return ret;
-}
-subsys_initcall(wm8994_ldo_init);
-
-static void __exit wm8994_ldo_exit(void)
-{
-	platform_driver_unregister(&wm8994_ldo_driver);
-}
-module_exit(wm8994_ldo_exit);
+module_platform_driver(wm8994_ldo_driver);
 
 /* Module information */
 MODULE_AUTHOR("Mark Brown <[email protected]>");
Signature · 1 line
1.7.10.4