]> git.karo-electronics.de Git - linux-beck.git/commitdiff
regulator: tps6524x: Use module_spi_driver()
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 3 Apr 2012 23:34:23 +0000 (00:34 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 4 Apr 2012 10:39:46 +0000 (11:39 +0100)
Unusual to see a regulator driver not using subsys_initcall() but the
deferred probe support should make this viable.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/tps6524x-regulator.c

index 2a828a07386aee643cae63e88682eea361790ffe..eabf0e601f65dfd75afc2ee6e547bcf5cf5a40a3 100644 (file)
@@ -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");