Commit 1424e21f authored by Axel Lin's avatar Axel Lin Committed by Linus Torvalds

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: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarKim Kyuwon <q1.kim@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 02016bc0
......@@ -662,6 +662,11 @@ static int bd2802_register_led_classdev(struct bd2802_led *led)
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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment