aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-lp5523.c
diff options
context:
space:
mode:
authorDan Murphy <dmurphy@ti.com>2020-07-16 13:20:00 -0500
committerPavel Machek <pavel@ucw.cz>2020-07-22 14:42:06 +0200
commitc732eaf01f9c213d34b2d224bcda830089bbcf8a (patch)
tree4d1a1670b2d4ad32bb5678f1b1e17bc0ad1d47ce /drivers/leds/leds-lp5523.c
parentdt-bindings: leds: Convert leds-lp55xx to yaml (diff)
downloadlinux-dev-c732eaf01f9c213d34b2d224bcda830089bbcf8a.tar.xz
linux-dev-c732eaf01f9c213d34b2d224bcda830089bbcf8a.zip
leds: lp55xx: Convert LED class registration to devm_*
Convert the LED class registration calls to the LED devm_* registration calls. Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/leds/leds-lp5523.c')
-rw-r--r--drivers/leds/leds-lp5523.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c
index 8518de957b48..cb550cf19e14 100644
--- a/drivers/leds/leds-lp5523.c
+++ b/drivers/leds/leds-lp5523.c
@@ -909,19 +909,17 @@ static int lp5523_probe(struct i2c_client *client,
ret = lp55xx_register_leds(led, chip);
if (ret)
- goto err_register_leds;
+ goto err_out;
ret = lp55xx_register_sysfs(chip);
if (ret) {
dev_err(&client->dev, "registering sysfs failed\n");
- goto err_register_sysfs;
+ goto err_out;
}
return 0;
-err_register_sysfs:
- lp55xx_unregister_leds(led, chip);
-err_register_leds:
+err_out:
lp55xx_deinit_device(chip);
err_init:
return ret;
@@ -934,7 +932,6 @@ static int lp5523_remove(struct i2c_client *client)
lp5523_stop_all_engines(chip);
lp55xx_unregister_sysfs(chip);
- lp55xx_unregister_leds(led, chip);
lp55xx_deinit_device(chip);
return 0;