diff options
-rw-r--r-- | drivers/leds/leds-lp55xx-common.c | 12 | ||||
-rw-r--r-- | drivers/leds/leds-lp55xx-common.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c index 9638ad4dc635..782ab84fe65f 100644 --- a/drivers/leds/leds-lp55xx-common.c +++ b/drivers/leds/leds-lp55xx-common.c | |||
@@ -509,6 +509,18 @@ dev_specific_attrs: | |||
509 | } | 509 | } |
510 | EXPORT_SYMBOL_GPL(lp55xx_register_sysfs); | 510 | EXPORT_SYMBOL_GPL(lp55xx_register_sysfs); |
511 | 511 | ||
512 | void lp55xx_unregister_sysfs(struct lp55xx_chip *chip) | ||
513 | { | ||
514 | struct device *dev = &chip->cl->dev; | ||
515 | struct lp55xx_device_config *cfg = chip->cfg; | ||
516 | |||
517 | if (cfg->dev_attr_group) | ||
518 | sysfs_remove_group(&dev->kobj, cfg->dev_attr_group); | ||
519 | |||
520 | sysfs_remove_group(&dev->kobj, &lp55xx_engine_attr_group); | ||
521 | } | ||
522 | EXPORT_SYMBOL_GPL(lp55xx_unregister_sysfs); | ||
523 | |||
512 | MODULE_AUTHOR("Milo Kim <milo.kim@ti.com>"); | 524 | MODULE_AUTHOR("Milo Kim <milo.kim@ti.com>"); |
513 | MODULE_DESCRIPTION("LP55xx Common Driver"); | 525 | MODULE_DESCRIPTION("LP55xx Common Driver"); |
514 | MODULE_LICENSE("GPL"); | 526 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/leds/leds-lp55xx-common.h b/drivers/leds/leds-lp55xx-common.h index 64eb78da1c4b..ece4761a1302 100644 --- a/drivers/leds/leds-lp55xx-common.h +++ b/drivers/leds/leds-lp55xx-common.h | |||
@@ -129,5 +129,6 @@ extern void lp55xx_unregister_leds(struct lp55xx_led *led, | |||
129 | 129 | ||
130 | /* common device attributes functions */ | 130 | /* common device attributes functions */ |
131 | extern int lp55xx_register_sysfs(struct lp55xx_chip *chip); | 131 | extern int lp55xx_register_sysfs(struct lp55xx_chip *chip); |
132 | extern void lp55xx_unregister_sysfs(struct lp55xx_chip *chip); | ||
132 | 133 | ||
133 | #endif /* _LEDS_LP55XX_COMMON_H */ | 134 | #endif /* _LEDS_LP55XX_COMMON_H */ |