From 892a8843fbef07a7f2ab62d5f7ff5c16ea0903b0 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Tue, 10 Jan 2012 15:09:24 -0800 Subject: 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 Acked-by: Haojian Zhuang [led-88pm860x.c] Acked-by: Mark Brown Cc: Richard Purdie Cc: Michael Hennerich Cc: Mike Rapoport Cc: Guennadi Liakhovetski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/leds/leds-s3c24xx.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'drivers/leds/leds-s3c24xx.c') diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c index 29f8b0f0e2c6..bd0a5ed49c42 100644 --- a/drivers/leds/leds-s3c24xx.c +++ b/drivers/leds/leds-s3c24xx.c @@ -121,18 +121,7 @@ static struct platform_driver s3c24xx_led_driver = { }, }; -static int __init s3c24xx_led_init(void) -{ - return platform_driver_register(&s3c24xx_led_driver); -} - -static void __exit s3c24xx_led_exit(void) -{ - platform_driver_unregister(&s3c24xx_led_driver); -} - -module_init(s3c24xx_led_init); -module_exit(s3c24xx_led_exit); +module_platform_driver(s3c24xx_led_driver); MODULE_AUTHOR("Ben Dooks "); MODULE_DESCRIPTION("S3C24XX LED driver"); -- cgit v1.2.3-58-ga151