diff options
author | Dan Murphy <dmurphy@ti.com> | 2020-07-16 21:20:00 +0300 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 2020-07-22 15:42:06 +0300 |
commit | c732eaf01f9c213d34b2d224bcda830089bbcf8a (patch) | |
tree | 4d1a1670b2d4ad32bb5678f1b1e17bc0ad1d47ce /drivers/leds/leds-lp5562.c | |
parent | a89d385daa6a943a8e556d8b8b648403909b33f7 (diff) | |
download | linux-c732eaf01f9c213d34b2d224bcda830089bbcf8a.tar.xz |
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-lp5562.c')
-rw-r--r-- | drivers/leds/leds-lp5562.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/leds/leds-lp5562.c b/drivers/leds/leds-lp5562.c index edb57c42e8b1..1c94422408b0 100644 --- a/drivers/leds/leds-lp5562.c +++ b/drivers/leds/leds-lp5562.c @@ -554,19 +554,17 @@ static int lp5562_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; @@ -580,7 +578,6 @@ static int lp5562_remove(struct i2c_client *client) lp5562_stop_engine(chip); lp55xx_unregister_sysfs(chip); - lp55xx_unregister_leds(led, chip); lp55xx_deinit_device(chip); return 0; |