diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-01-10 18:09:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 19:30:48 -0500 |
commit | 892a8843fbef07a7f2ab62d5f7ff5c16ea0903b0 (patch) | |
tree | cddc55a75280ec2851e26f127acd2f05e9483cc1 /drivers/leds/leds-hp6xx.c | |
parent | e2c17bc6f717a8847df2a867caec6ba4fe85f3fc (diff) |
leds: convert led platform drivers to module_platform_driver
Factor out some boilerplate code for platform driver registration into
module_platform_driver.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Haojian Zhuang <hzhuang1@marvell.com> [led-88pm860x.c]
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Michael Hennerich <hennerich@blackfin.uclinux.org>
Cc: Mike Rapoport <mike@compulab.co.il>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/leds/leds-hp6xx.c')
-rw-r--r-- | drivers/leds/leds-hp6xx.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/leds/leds-hp6xx.c b/drivers/leds/leds-hp6xx.c index bcfbd3a60eab..366b6055e330 100644 --- a/drivers/leds/leds-hp6xx.c +++ b/drivers/leds/leds-hp6xx.c | |||
@@ -79,9 +79,6 @@ static int hp6xxled_remove(struct platform_device *pdev) | |||
79 | return 0; | 79 | return 0; |
80 | } | 80 | } |
81 | 81 | ||
82 | /* work with hotplug and coldplug */ | ||
83 | MODULE_ALIAS("platform:hp6xx-led"); | ||
84 | |||
85 | static struct platform_driver hp6xxled_driver = { | 82 | static struct platform_driver hp6xxled_driver = { |
86 | .probe = hp6xxled_probe, | 83 | .probe = hp6xxled_probe, |
87 | .remove = hp6xxled_remove, | 84 | .remove = hp6xxled_remove, |
@@ -91,19 +88,9 @@ static struct platform_driver hp6xxled_driver = { | |||
91 | }, | 88 | }, |
92 | }; | 89 | }; |
93 | 90 | ||
94 | static int __init hp6xxled_init(void) | 91 | module_platform_driver(hp6xxled_driver); |
95 | { | ||
96 | return platform_driver_register(&hp6xxled_driver); | ||
97 | } | ||
98 | |||
99 | static void __exit hp6xxled_exit(void) | ||
100 | { | ||
101 | platform_driver_unregister(&hp6xxled_driver); | ||
102 | } | ||
103 | |||
104 | module_init(hp6xxled_init); | ||
105 | module_exit(hp6xxled_exit); | ||
106 | 92 | ||
107 | MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>"); | 93 | MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>"); |
108 | MODULE_DESCRIPTION("HP Jornada 6xx LED driver"); | 94 | MODULE_DESCRIPTION("HP Jornada 6xx LED driver"); |
109 | MODULE_LICENSE("GPL"); | 95 | MODULE_LICENSE("GPL"); |
96 | MODULE_ALIAS("platform:hp6xx-led"); | ||