]> Pileus Git - ~andy/linux/commitdiff
leds: move leds-clevo-mail's probe function to .devinit.text
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sat, 11 Jul 2009 20:52:34 +0000 (22:52 +0200)
committerRichard Purdie <rpurdie@linux.intel.com>
Mon, 7 Sep 2009 13:41:51 +0000 (14:41 +0100)
A pointer to clevo_mail_led_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded.  Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
drivers/leds/leds-clevo-mail.c

index 1813c84ea5fccb10293e499a3721dacf94c54290..8ee83ceb4a7d41739a0171798d32fe950a87c63f 100644 (file)
@@ -145,7 +145,7 @@ static struct led_classdev clevo_mail_led = {
        .flags                  = LED_CORE_SUSPENDRESUME,
 };
 
-static int __init clevo_mail_led_probe(struct platform_device *pdev)
+static int __devinit clevo_mail_led_probe(struct platform_device *pdev)
 {
        return led_classdev_register(&pdev->dev, &clevo_mail_led);
 }