diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-15 22:04:53 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-15 22:04:53 -0700 |
commit | 9256d5a308c95a50c6e85d682492ae1f86a70f9b (patch) | |
tree | 90350aa8bcb69072b9cf9b4606faa320ed2d2a1a /drivers/leds/leds-lm3533.c | |
parent | 13f6f62f61b4d3d5f45bed889128bb7ff3fda5ed (diff) | |
parent | 7296c33ed12ef13de50e03c76643382123766f96 (diff) |
Merge tag 'leds_for_4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds
Pull LED updates from Jacek Anaszewski:
"LED core improvements:
- Fix misleading comment after workqueue removal from drivers
- Avoid error message when a USB LED device is unplugged
- Add helpers for calling brightness_set(_blocking)
LED triggers:
- Simplify led_trigger_store by using sysfs_streq()
LED class drivers improvements:
- Improve wording and formatting in a comment: lp3944
- Fix return value check in create_gpio_led(): leds-gpio
- Use GPIOF_OUT_INIT_LOW instead of hardcoded zero: leds-gpio
- Use devm_led_classdev_register(): leds-lm3533, leds-lm3533,
leds-lp8788, leds-wm831x-status, leds-s3c24xx, leds-s3c24xx,
leds-max8997.
New LED class driver:
- Add driver for the ISSI IS31FL32xx family of LED controllers.
Device Tree documentation:
- of: Add vendor prefixes for Integrated Silicon Solutions Inc.
(issi) and Si-En Technology (si-en).
- DT: Add common bindings for Si-En Technology SN3216/18 and
IS31FL32xx family of LED controllers, since they seem to be the
same hardware, just rebranded"
* tag 'leds_for_4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
leds: triggers: simplify led_trigger_store
leds: max8997: Use devm_led_classdev_register
leds: da903x: Use devm_led_classdev_register
leds: s3c24xx: Use devm_led_classdev_register
leds: wm831x-status: Use devm_led_classdev_register
leds: lp8788: Use devm_led_classdev_register
leds: 88pm860x: Use devm_led_classdev_register
leds: Add SN3218 and SN3216 support to the IS31FL32XX driver
of: Add vendor prefix for Si-En Technology
leds: Add driver for the ISSI IS31FL32xx family of LED controllers
DT: leds: Add binding for the ISSI IS31FL32xx family of LED controllers
DT: Add vendor prefix for Integrated Silicon Solutions Inc.
leds: lm3533: Use devm_led_classdev_register
leds: gpio: Use GPIOF_OUT_INIT_LOW instead of hardcoded zero
leds: core: add helpers for calling brightness_set(_blocking)
leds: leds-gpio: Fix return value check in create_gpio_led()
leds: lp3944: improve wording and formatting in a comment
leds: core: avoid error message when a USB LED device is unplugged
leds: core: fix misleading comment after workqueue removal from drivers
Diffstat (limited to 'drivers/leds/leds-lm3533.c')
-rw-r--r-- | drivers/leds/leds-lm3533.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/leds/leds-lm3533.c b/drivers/leds/leds-lm3533.c index 196dcb5e6004..5b529dc013d2 100644 --- a/drivers/leds/leds-lm3533.c +++ b/drivers/leds/leds-lm3533.c @@ -698,7 +698,7 @@ static int lm3533_led_probe(struct platform_device *pdev) platform_set_drvdata(pdev, led); - ret = led_classdev_register(pdev->dev.parent, &led->cdev); + ret = devm_led_classdev_register(pdev->dev.parent, &led->cdev); if (ret) { dev_err(&pdev->dev, "failed to register LED %d\n", pdev->id); return ret; @@ -708,18 +708,13 @@ static int lm3533_led_probe(struct platform_device *pdev) ret = lm3533_led_setup(led, pdata); if (ret) - goto err_unregister; + return ret; ret = lm3533_ctrlbank_enable(&led->cb); if (ret) - goto err_unregister; + return ret; return 0; - -err_unregister: - led_classdev_unregister(&led->cdev); - - return ret; } static int lm3533_led_remove(struct platform_device *pdev) @@ -729,7 +724,6 @@ static int lm3533_led_remove(struct platform_device *pdev) dev_dbg(&pdev->dev, "%s\n", __func__); lm3533_ctrlbank_disable(&led->cb); - led_classdev_unregister(&led->cdev); return 0; } |