diff mbox series

[v13,12/18] leds: lp55xx: Convert LED class registration to devm_*

Message ID 20191016155954.29044-13-dmurphy@ti.com
State New
Headers show
Series Multicolor Framework v13 | expand

Commit Message

Dan Murphy Oct. 16, 2019, 3:59 p.m. UTC
Convert the LED class registration calls to the LED devm_*
registration calls.

Signed-off-by: Dan Murphy <dmurphy@ti.com>

---
 drivers/leds/leds-lp55xx-common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.22.0.214.g8dca754b1e
diff mbox series

Patch

diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c
index 44ced02b49f9..824d1d73dde1 100644
--- a/drivers/leds/leds-lp55xx-common.c
+++ b/drivers/leds/leds-lp55xx-common.c
@@ -181,7 +181,7 @@  static int lp55xx_init_led(struct lp55xx_led *led,
 		led->cdev.name = name;
 	}
 
-	ret = led_classdev_register(dev, &led->cdev);
+	ret = devm_led_classdev_register(dev, &led->cdev);
 	if (ret) {
 		dev_err(dev, "led register err: %d\n", ret);
 		return ret;
@@ -502,7 +502,7 @@  void lp55xx_unregister_leds(struct lp55xx_led *led, struct lp55xx_chip *chip)
 
 	for (i = 0; i < chip->num_leds; i++) {
 		each = led + i;
-		led_classdev_unregister(&each->cdev);
+		devm_led_classdev_unregister(each->cdev.dev, &each->cdev);
 	}
 }
 EXPORT_SYMBOL_GPL(lp55xx_unregister_leds);