Skip to content

Commit e63a744

Browse files
Dan Murphypavelmachek
authored andcommitted
leds: lm3601x: Convert class registration to device managed
Convert LED flash class registration to device managed class registration API. Signed-off-by: Dan Murphy <[email protected]> Signed-off-by: Pavel Machek <[email protected]>
1 parent 20cdba9 commit e63a744

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/leds/leds-lm3601x.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,7 @@ static int lm3601x_register_leds(struct lm3601x_led *led,
350350
init_data.devicename = led->client->name;
351351
init_data.default_label = (led->led_mode == LM3601X_LED_TORCH) ?
352352
"torch" : "infrared";
353-
354-
return led_classdev_flash_register_ext(&led->client->dev,
353+
return devm_led_classdev_flash_register_ext(&led->client->dev,
355354
&led->fled_cdev, &init_data);
356355
}
357356

@@ -445,7 +444,6 @@ static int lm3601x_remove(struct i2c_client *client)
445444
{
446445
struct lm3601x_led *led = i2c_get_clientdata(client);
447446

448-
led_classdev_flash_unregister(&led->fled_cdev);
449447
mutex_destroy(&led->lock);
450448

451449
return regmap_update_bits(led->regmap, LM3601X_ENABLE_REG,

0 commit comments

Comments
 (0)