@@ -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);
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