lkml.org 
[lkml]   [2019]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v13 12/18] leds: lp55xx: Convert LED class registration to devm_*
Date
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(-)

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);
--
2.22.0.214.g8dca754b1e
\
 
 \ /
  Last update: 2019-10-16 18:01    [W:0.110 / U:1.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site