Message ID | 1341316074-14886-2-git-send-email-sachin.kamat@linaro.org |
---|---|
State | Accepted |
Headers | show |
On Tue, Jul 3, 2012 at 7:47 PM, Sachin Kamat <sachin.kamat@linaro.org> wrote: > module_platform_driver() makes the code simpler. > > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Thanks, applied to my for-next branch -Bryan > --- > drivers/leds/leds-max8997.c | 12 +----------- > 1 files changed, 1 insertions(+), 11 deletions(-) > > diff --git a/drivers/leds/leds-max8997.c b/drivers/leds/leds-max8997.c > index d9bcb49..979b629 100644 > --- a/drivers/leds/leds-max8997.c > +++ b/drivers/leds/leds-max8997.c > @@ -351,17 +351,7 @@ static struct platform_driver max8997_led_driver = { > .remove = __devexit_p(max8997_led_remove), > }; > > -static int __init max8997_led_init(void) > -{ > - return platform_driver_register(&max8997_led_driver); > -} > -module_init(max8997_led_init); > - > -static void __exit max8997_led_exit(void) > -{ > - platform_driver_unregister(&max8997_led_driver); > -} > -module_exit(max8997_led_exit); > +module_platform_driver(max8997_led_driver); > > MODULE_AUTHOR("Donggeun Kim <dg77.kim@samsung.com>"); > MODULE_DESCRIPTION("MAX8997 LED driver"); > -- > 1.7.4.1 >
diff --git a/drivers/leds/leds-max8997.c b/drivers/leds/leds-max8997.c index d9bcb49..979b629 100644 --- a/drivers/leds/leds-max8997.c +++ b/drivers/leds/leds-max8997.c @@ -351,17 +351,7 @@ static struct platform_driver max8997_led_driver = { .remove = __devexit_p(max8997_led_remove), }; -static int __init max8997_led_init(void) -{ - return platform_driver_register(&max8997_led_driver); -} -module_init(max8997_led_init); - -static void __exit max8997_led_exit(void) -{ - platform_driver_unregister(&max8997_led_driver); -} -module_exit(max8997_led_exit); +module_platform_driver(max8997_led_driver); MODULE_AUTHOR("Donggeun Kim <dg77.kim@samsung.com>"); MODULE_DESCRIPTION("MAX8997 LED driver");
module_platform_driver() makes the code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> --- drivers/leds/leds-max8997.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-)