aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-lp55xx-common.c
diff options
context:
space:
mode:
authorMilo(Woogyom) Kim <milo.kim@ti.com>2013-02-05 05:23:04 -0500
committerBryan Wu <cooloney@gmail.com>2013-02-06 18:59:29 -0500
commitba6fa84651ff9a609e0ceb8265e3335ab6ed656d (patch)
tree04599eaf0bac86e7032c3b481434f81185f80ddf /drivers/leds/leds-lp55xx-common.c
parent9ca3bd8022d76a0d1b386cedcecaf49004a58644 (diff)
leds-lp55xx: add new function for removing device attribtues
lp55xx_unregister_sysfs() is used for removing lp55xx device attributes. Chip specific and engine attributes are removed on unloading the driver. 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.c12
1 files changed, 12 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}
510EXPORT_SYMBOL_GPL(lp55xx_register_sysfs); 510EXPORT_SYMBOL_GPL(lp55xx_register_sysfs);
511 511
512void 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}
522EXPORT_SYMBOL_GPL(lp55xx_unregister_sysfs);
523
512MODULE_AUTHOR("Milo Kim <milo.kim@ti.com>"); 524MODULE_AUTHOR("Milo Kim <milo.kim@ti.com>");
513MODULE_DESCRIPTION("LP55xx Common Driver"); 525MODULE_DESCRIPTION("LP55xx Common Driver");
514MODULE_LICENSE("GPL"); 526MODULE_LICENSE("GPL");