summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-08-25 15:59:21 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-08-25 16:25:35 -0700
commit1424e21f66f4c51c31ba6ac188df46b43f51556b (patch)
tree0c341efce4f0f9abdb3bd0f5ac27ad1e99c733aa
parent02016bc0381c4af9153b4e4008edfadae2bd6abc (diff)
drivers/leds/leds-bd2802.c: bd2802_unregister_led_classdev() should unregister all registered leds
bd2802_unregister_led_classdev() should unregister all registered instances of led_classdev class that had registered by bd2802_register_led_classdev(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Kim Kyuwon <q1.kim@samsung.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/leds/leds-bd2802.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/leds/leds-bd2802.c b/drivers/leds/leds-bd2802.c
index 3ebe3824662..ea2185531f8 100644
--- a/drivers/leds/leds-bd2802.c
+++ b/drivers/leds/leds-bd2802.c
@@ -662,6 +662,11 @@ failed_unregister_led1_R:
static void bd2802_unregister_led_classdev(struct bd2802_led *led)
{
cancel_work_sync(&led->work);
+ led_classdev_unregister(&led->cdev_led2b);
+ led_classdev_unregister(&led->cdev_led2g);
+ led_classdev_unregister(&led->cdev_led2r);
+ led_classdev_unregister(&led->cdev_led1b);
+ led_classdev_unregister(&led->cdev_led1g);
led_classdev_unregister(&led->cdev_led1r);
}