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>
This commit is contained in:
Axel Lin 2011-08-25 15:59:21 -07:00 committed by Linus Torvalds
parent 02016bc038
commit 1424e21f66
1 changed files with 5 additions and 0 deletions

View File

@ -662,6 +662,11 @@ failed_unregister_led1_R:
static void bd2802_unregister_led_classdev(struct bd2802_led *led) static void bd2802_unregister_led_classdev(struct bd2802_led *led)
{ {
cancel_work_sync(&led->work); 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); led_classdev_unregister(&led->cdev_led1r);
} }