From: Mark Brown Date: Tue, 3 Apr 2012 23:34:23 +0000 (+0100) Subject: regulator: tps6524x: Use module_spi_driver() X-Git-Tag: firefly_0821_release~3680^2~2855^2~58^3~63 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=173f24d1ffe23f46b689159ee9d6b6aa402ff2e9;p=firefly-linux-kernel-4.4.55.git 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. Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/tps6524x-regulator.c b/drivers/regulator/tps6524x-regulator.c index 2a828a07386a..eabf0e601f65 100644 --- a/drivers/regulator/tps6524x-regulator.c +++ b/drivers/regulator/tps6524x-regulator.c @@ -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");