Skip to contentSkip to conversation

regulator: tps6524x: Use module_spi_driver()

PATCH New Mark Brown 1 participant 1 message Apr 3, 2012 Voltage and current regulator framework

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 regulator: tps6524x: Use module_spi_driver()

Unusual to see a regulator driver not using subsys_initcall() but the deferred probe support should make this viable.

---
 drivers/regulator/tps6524x-regulator.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
drivers/regulator/tps6524x-regulator.c +1 -11
index 2a828a0..b33105f 100644
@@ -661,17 +661,7 @@ static struct spi_driver pmic_driver = {
 	},
 };
 
-static int __init pmic_driver_init(void)
-{
-	return spi_register_driver(&pmic_driver);
-}
-module_init(pmic_driver_init);
-
-static void __exit pmic_driver_exit(void)
-{
-	spi_unregister_driver(&pmic_driver);
-}
-module_exit(pmic_driver_exit);
+module_spi_driver(&pmic_driver);
 
 MODULE_DESCRIPTION("TPS6524X PMIC Driver");
 MODULE_AUTHOR("Cyril Chemparathy");
Signature · 1 line
1.7.9.1