Explorar el Código

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 <jdelvare@suse.de>
Cc: Bryan Wu <cooloney@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
Jean Delvare hace 11 años
padre
commit
0016db26c0
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  1. 1 2
      drivers/leds/leds-clevo-mail.c

+ 1 - 2
drivers/leds/leds-clevo-mail.c

@@ -153,7 +153,7 @@ static struct led_classdev clevo_mail_led = {
 	.flags			= LED_CORE_SUSPENDRESUME,
 	.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);
 	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 = {
 static struct platform_driver clevo_mail_led_driver = {
-	.probe		= clevo_mail_led_probe,
 	.remove		= clevo_mail_led_remove,
 	.remove		= clevo_mail_led_remove,
 	.driver		= {
 	.driver		= {
 		.name		= KBUILD_MODNAME,
 		.name		= KBUILD_MODNAME,