Skip to content

Commit

Permalink
leds: clevo-mail: Make probe function __init
Browse files Browse the repository at this point in the history
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]>
Signed-off-by: Bryan Wu <[email protected]>
  • Loading branch information
jdelvare authored and cooloney committed Mar 13, 2014
1 parent d9e8928 commit 0016db2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/leds/leds-clevo-mail.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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,
Expand Down

0 comments on commit 0016db2

Please sign in to comment.