leds: clevo-mail: Make probe function __init
authorJean Delvare <jdelvare@suse.de>
Thu, 13 Mar 2014 17:56:24 +0000 (10:56 -0700)
committerBryan Wu <cooloney@gmail.com>
Thu, 13 Mar 2014 22:53:31 +0000 (15:53 -0700)
One of the benefits of platform_driver_probe() is that you can make
the probe function __init.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Bryan Wu <cooloney@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
drivers/leds/leds-clevo-mail.c

index 19202f5..f58a354 100644 (file)
@@ -153,7 +153,7 @@ static struct led_classdev clevo_mail_led = {
        .flags                  = LED_CORE_SUSPENDRESUME,
 };
 
-static int clevo_mail_led_probe(struct platform_device *pdev)
+static int __init clevo_mail_led_probe(struct platform_device *pdev)
 {
        return led_classdev_register(&pdev->dev, &clevo_mail_led);
 }
@@ -165,7 +165,6 @@ static int clevo_mail_led_remove(struct platform_device *pdev)
 }
 
 static struct platform_driver clevo_mail_led_driver = {
-       .probe          = clevo_mail_led_probe,
        .remove         = clevo_mail_led_remove,
        .driver         = {
                .name           = KBUILD_MODNAME,