]> err.no Git - linux-2.6/commitdiff
leds: Fix locomo LED driver oops
authorRichard Purdie <rpurdie@rpsys.net>
Mon, 31 Dec 2007 23:11:11 +0000 (23:11 +0000)
committerRichard Purdie <rpurdie@rpsys.net>
Mon, 31 Dec 2007 23:11:11 +0000 (23:11 +0000)
Fix locomo-leds to use the correct struct device to prevent an oops.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
drivers/leds/leds-locomo.c

index bfac499f3258f74fd2c96267c7e9b9a5361a72bf..2207335e9212e97b64a05bdd290819ceee83a89d 100644 (file)
@@ -19,7 +19,7 @@
 static void locomoled_brightness_set(struct led_classdev *led_cdev,
                                enum led_brightness value, int offset)
 {
-       struct locomo_dev *locomo_dev = LOCOMO_DEV(led_cdev->dev);
+       struct locomo_dev *locomo_dev = LOCOMO_DEV(led_cdev->dev->parent);
        unsigned long flags;
 
        local_irq_save(flags);