diff mbox series

[v2,3/6] leds: lm3601x: Convert class registration to device managed

Message ID 20191002124042.25593-3-dmurphy@ti.com
State Accepted
Commit e63a744871a31cebc7860c5b38b3655d70cfc584
Headers show
Series [v2,1/6] leds: flash: Remove extern from the header file | expand

Commit Message

Dan Murphy Oct. 2, 2019, 12:40 p.m. UTC
Convert LED flash class registration to device managed class
registration API.

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

---
 drivers/leds/leds-lm3601x.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

-- 
2.22.0.214.g8dca754b1e
diff mbox series

Patch

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,