Commit 109b8330 authored by Milo(Woogyom) Kim's avatar Milo(Woogyom) Kim Committed by Bryan Wu

leds-lp55xx: fix problem on removing LED attributes

 LP55XX common device attributes, 'led_current' and 'max_current' are created
 while loading the driver.
 Those are LED device attributes which are removed automatically on releasing
 led class devices - led_classdev_unregister().
 Therefore, this duplicate code should be removed.
Signed-off-by: default avatarMilo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: default avatarBryan Wu <cooloney@gmail.com>
parent a2387cb9
......@@ -478,12 +478,9 @@ void lp55xx_unregister_leds(struct lp55xx_led *led, struct lp55xx_chip *chip)
{
int i;
struct lp55xx_led *each;
struct kobject *kobj;
for (i = 0; i < chip->num_leds; i++) {
each = led + i;
kobj = &led->cdev.dev->kobj;
sysfs_remove_group(kobj, &lp55xx_led_attr_group);
led_classdev_unregister(&each->cdev);
flush_work(&each->brightness_work);
}
......
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