]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
leds-lp55xx: fix problem on removing LED attributes
authorMilo(Woogyom) Kim <milo.kim@ti.com>
Tue, 5 Feb 2013 10:28:44 +0000 (19:28 +0900)
committerBryan Wu <cooloney@gmail.com>
Wed, 6 Feb 2013 23:59:30 +0000 (15:59 -0800)
 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>
drivers/leds/leds-lp55xx-common.c

index 782ab84fe65fc0f0936a0eae95a9dcaf4b439948..d9eb8415742386ce4ad9eec1dade07ef809a59de 100644 (file)
@@ -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);
        }