diff options
author | Milo(Woogyom) Kim <milo.kim@ti.com> | 2013-02-05 05:28:44 -0500 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2013-02-06 18:59:30 -0500 |
commit | 109b833071b44a4a6f5dc56385025543ed15a500 (patch) | |
tree | 295f32ace83d73a7d58c72668097650270f84758 /drivers/leds/leds-lp55xx-common.c | |
parent | a2387cb9f6974fede9bf2d731a78ca158acb5424 (diff) |
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: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers/leds/leds-lp55xx-common.c')
-rw-r--r-- | drivers/leds/leds-lp55xx-common.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c index 782ab84fe65f..d9eb84157423 100644 --- a/drivers/leds/leds-lp55xx-common.c +++ b/drivers/leds/leds-lp55xx-common.c | |||
@@ -478,12 +478,9 @@ void lp55xx_unregister_leds(struct lp55xx_led *led, struct lp55xx_chip *chip) | |||
478 | { | 478 | { |
479 | int i; | 479 | int i; |
480 | struct lp55xx_led *each; | 480 | struct lp55xx_led *each; |
481 | struct kobject *kobj; | ||
482 | 481 | ||
483 | for (i = 0; i < chip->num_leds; i++) { | 482 | for (i = 0; i < chip->num_leds; i++) { |
484 | each = led + i; | 483 | each = led + i; |
485 | kobj = &led->cdev.dev->kobj; | ||
486 | sysfs_remove_group(kobj, &lp55xx_led_attr_group); | ||
487 | led_classdev_unregister(&each->cdev); | 484 | led_classdev_unregister(&each->cdev); |
488 | flush_work(&each->brightness_work); | 485 | flush_work(&each->brightness_work); |
489 | } | 486 | } |