summaryrefslogtreecommitdiff
path: root/drivers/leds
diff options
context:
space:
mode:
authorDan Murphy <dmurphy@ti.com>2019-10-02 15:40:39 +0300
committerPavel <pavel@ucw.cz>2019-11-03 19:38:41 +0300
commite63a744871a31cebc7860c5b38b3655d70cfc584 (patch)
treeb11c542c820c1f08e81bcb15172ca2ee66ce36d8 /drivers/leds
parent20cdba9d9c165e475fcc5af97857b6fa7aec96a0 (diff)
downloadlinux-e63a744871a31cebc7860c5b38b3655d70cfc584.tar.xz
leds: lm3601x: Convert class registration to device managed
Convert LED flash class registration to device managed class registration API. Signed-off-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-lm3601x.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/leds/leds-lm3601x.c b/drivers/leds/leds-lm3601x.c
index b02972f1a341..fce89f2a2d92 100644
--- a/drivers/leds/leds-lm3601x.c
+++ b/drivers/leds/leds-lm3601x.c
@@ -350,8 +350,7 @@ static int lm3601x_register_leds(struct lm3601x_led *led,
init_data.devicename = led->client->name;
init_data.default_label = (led->led_mode == LM3601X_LED_TORCH) ?
"torch" : "infrared";
-
- return led_classdev_flash_register_ext(&led->client->dev,
+ return devm_led_classdev_flash_register_ext(&led->client->dev,
&led->fled_cdev, &init_data);
}
@@ -445,7 +444,6 @@ static int lm3601x_remove(struct i2c_client *client)
{
struct lm3601x_led *led = i2c_get_clientdata(client);
- led_classdev_flash_unregister(&led->fled_cdev);
mutex_destroy(&led->lock);
return regmap_update_bits(led->regmap, LM3601X_ENABLE_REG,