From: Milo(Woogyom) Kim Date: Tue, 5 Feb 2013 10:28:44 +0000 (+0900) Subject: leds-lp55xx: fix problem on removing LED attributes X-Git-Tag: next-20130218~30^2~5 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=109b833071b44a4a6f5dc56385025543ed15a500;p=karo-tx-linux.git 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 Signed-off-by: Bryan Wu --- 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) { 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); }