[PATCH] leds: clevo-mail: Make probe function __init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



One of the benefits of platform_driver_probe() is that you can make
the probe function __init.

Signed-off-by: Jean Delvare <jdelvare@xxxxxxx>
Cc: Bryan Wu <cooloney@xxxxxxxxx>
Cc: Richard Purdie <rpurdie@xxxxxxxxx>
---
Build tested only, no hardware.

 drivers/leds/leds-clevo-mail.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- linux-3.14-rc6.orig/drivers/leds/leds-clevo-mail.c	2014-01-20 03:40:07.000000000 +0100
+++ linux-3.14-rc6/drivers/leds/leds-clevo-mail.c	2014-03-13 18:29:24.597849128 +0100
@@ -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
--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux