aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-hp6xx.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-01-10 18:09:24 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-10 19:30:48 -0500
commit892a8843fbef07a7f2ab62d5f7ff5c16ea0903b0 (patch)
treecddc55a75280ec2851e26f127acd2f05e9483cc1 /drivers/leds/leds-hp6xx.c
parente2c17bc6f717a8847df2a867caec6ba4fe85f3fc (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.c17
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 */
83MODULE_ALIAS("platform:hp6xx-led");
84
85static struct platform_driver hp6xxled_driver = { 82static 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
94static int __init hp6xxled_init(void) 91module_platform_driver(hp6xxled_driver);
95{
96 return platform_driver_register(&hp6xxled_driver);
97}
98
99static void __exit hp6xxled_exit(void)
100{
101 platform_driver_unregister(&hp6xxled_driver);
102}
103
104module_init(hp6xxled_init);
105module_exit(hp6xxled_exit);
106 92
107MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>"); 93MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>");
108MODULE_DESCRIPTION("HP Jornada 6xx LED driver"); 94MODULE_DESCRIPTION("HP Jornada 6xx LED driver");
109MODULE_LICENSE("GPL"); 95MODULE_LICENSE("GPL");
96MODULE_ALIAS("platform:hp6xx-led");