diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-24 02:58:34 +0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-01-09 03:37:31 +0400 |
commit | 65349d60d27e850c94544567c91ab1be3e4c0777 (patch) | |
tree | 94344d80022bd870caa8ceab73df5a51c954a5dc /drivers/mfd/twl4030-madc.c | |
parent | 35ca98423a4c61decc20cd1d1e78a7fd7111e4db (diff) | |
download | linux-65349d60d27e850c94544567c91ab1be3e4c0777.tar.xz |
mfd: Convert MFD drivers to use module_platform_driver
Factors out some boilerplate code for drivers doing the default thing
for platform driver registration. Drivers using platform_driver_probe
or an initcall other than module_init can't be converted.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/twl4030-madc.c')
-rw-r--r-- | drivers/mfd/twl4030-madc.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/mfd/twl4030-madc.c b/drivers/mfd/twl4030-madc.c index 834f824d3c11..456ecb5ac4fe 100644 --- a/drivers/mfd/twl4030-madc.c +++ b/drivers/mfd/twl4030-madc.c @@ -807,19 +807,7 @@ static struct platform_driver twl4030_madc_driver = { }, }; -static int __init twl4030_madc_init(void) -{ - return platform_driver_register(&twl4030_madc_driver); -} - -module_init(twl4030_madc_init); - -static void __exit twl4030_madc_exit(void) -{ - platform_driver_unregister(&twl4030_madc_driver); -} - -module_exit(twl4030_madc_exit); +module_platform_driver(twl4030_madc_driver); MODULE_DESCRIPTION("TWL4030 ADC driver"); MODULE_LICENSE("GPL"); |