mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 18:20:53 +07:00
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:
parent
02016bc038
commit
1424e21f66
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user