leds: Use module_platform_driver() in leds-max8997.c file

module_platform_driver() makes the code simpler.

Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Bryan Wu <[email protected]>
This commit is contained in:
Sachin Kamat 2012-07-03 19:47:51 +08:00 • committed by Bryan Wu
commit 7fafefb86e

View file

@ -354,17 +354,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 <[email protected]>");
MODULE_DESCRIPTION("MAX8997 LED driver");