leds: clevo-mail: Make probe function __init
PATCH 1/1 leds: clevo-mail: Make probe function __init
One of the benefits of platform_driver_probe() is that you can make the probe function __init.
Signed-off-by Jean Delvare <[email protected]>
Cc Bryan Wu <[email protected]>
Cc Richard Purdie <[email protected]>
---
Build tested only, no hardware.
drivers/leds/leds-clevo-mail.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/leds/leds-clevo-mail.c +1 -2
@@ -153,7 +153,7 @@ static struct led_classdev clevo_mail_le .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 }static struct platform_driver clevo_mail_led_driver = { - .probe = clevo_mail_led_probe, .remove = clevo_mail_led_remove, .driver = { .name =KBUILD_MODNAME ,
Signature · 2 lines
Jean Delvare SUSE L3 Support
Quoted 3 lines · Jean Delvare
One of the benefits of
platform_driver_probe()is that you can make the probe function__init.
Thanks, merged.
-Bryan
Quoted 33 lines
Signed-off-by Jean Delvare <[email protected]>Cc Bryan Wu <[email protected]>Cc Richard Purdie <[email protected]>---
Build tested only, no hardware.drivers/leds/leds-clevo-mail.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/leds/leds-clevo-mail.c 2014-03-13 18:29:24.597849128 +0100 renamed from drivers/leds/leds-clevo-mail.c 2014-01-20 03:40:07.000000000 +0100 +1
-3@@ -153,7 +153,7 @@ static struct led_classdev clevo_mail_le .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 } static struct platform_driver clevo_mail_led_driver = { - .probe = clevo_mail_led_probe, .remove = clevo_mail_led_remove, .driver = { .name = KBUILD_MODNAME, --Jean Delvare
SUSE L3 Support