diff options
author | Dan Murphy <dmurphy@ti.com> | 2020-07-16 20:20:00 +0200 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 2020-07-22 14:42:06 +0200 |
commit | c732eaf01f9c213d34b2d224bcda830089bbcf8a (patch) | |
tree | 4d1a1670b2d4ad32bb5678f1b1e17bc0ad1d47ce /drivers/leds/leds-lp5521.c | |
parent | dt-bindings: leds: Convert leds-lp55xx to yaml (diff) | |
download | linux-c732eaf01f9c213d34b2d224bcda830089bbcf8a.tar.xz linux-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-lp5521.c')
-rw-r--r-- | drivers/leds/leds-lp5521.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c index 6f0272249dc8..6d2163c0f625 100644 --- a/drivers/leds/leds-lp5521.c +++ b/drivers/leds/leds-lp5521.c @@ -541,19 +541,17 @@ static int lp5521_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; @@ -566,7 +564,6 @@ static int lp5521_remove(struct i2c_client *client) lp5521_stop_all_engines(chip); lp55xx_unregister_sysfs(chip); - lp55xx_unregister_leds(led, chip); lp55xx_deinit_device(chip); return 0; |