diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-27 22:38:39 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-28 06:49:13 -0500 |
commit | 005d610f2abc550172726b997f5cfe683769cc1c (patch) | |
tree | 50803d17eed521814c0e2d2bd892d29260ec946e /drivers/regulator/virtual.c | |
parent | a5228d2e5ea02c90581d5957cb6c4c73c191298f (diff) |
regulator: Convert virtual and userspace regulator consumer drivers to use module_platform_driver()
This patch converts virtual and userspace regulator consumer drivers to use the
module_platform_driver() macro which makes the code smaller and a bit simpler.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/virtual.c')
-rw-r--r-- | drivers/regulator/virtual.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/regulator/virtual.c b/drivers/regulator/virtual.c index 858c1f861ba5..ee0b161c998f 100644 --- a/drivers/regulator/virtual.c +++ b/drivers/regulator/virtual.c | |||
@@ -352,17 +352,7 @@ static struct platform_driver regulator_virtual_consumer_driver = { | |||
352 | }, | 352 | }, |
353 | }; | 353 | }; |
354 | 354 | ||
355 | static int __init regulator_virtual_consumer_init(void) | 355 | module_platform_driver(regulator_virtual_consumer_driver); |
356 | { | ||
357 | return platform_driver_register(®ulator_virtual_consumer_driver); | ||
358 | } | ||
359 | module_init(regulator_virtual_consumer_init); | ||
360 | |||
361 | static void __exit regulator_virtual_consumer_exit(void) | ||
362 | { | ||
363 | platform_driver_unregister(®ulator_virtual_consumer_driver); | ||
364 | } | ||
365 | module_exit(regulator_virtual_consumer_exit); | ||
366 | 356 | ||
367 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); | 357 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); |
368 | MODULE_DESCRIPTION("Virtual regulator consumer"); | 358 | MODULE_DESCRIPTION("Virtual regulator consumer"); |