Skip to content

Commit 64ed658

Browse files
ribaldapavelmachek
authored andcommitted
leds: core: Fix warning message when init_data
The warning message when a led is renamed due to name collition can fail to show proper original name if init_data is used. Eg: [ 9.073996] leds-gpio a0040000.leds_0: Led (null) renamed to red_led_1 due to name collision Fixes: bb4e9af ("leds: core: Add support for composing LED class device names") Signed-off-by: Ricardo Ribalda Delgado <[email protected]> Acked-by: Jacek Anaszewski <[email protected]> Signed-off-by: Pavel Machek <[email protected]>
1 parent 4b37883 commit 64ed658

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/leds/led-class.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ int led_classdev_register_ext(struct device *parent,
376376

377377
if (ret)
378378
dev_warn(parent, "Led %s renamed to %s due to name collision",
379-
led_cdev->name, dev_name(led_cdev->dev));
379+
proposed_name, dev_name(led_cdev->dev));
380380

381381
if (led_cdev->flags & LED_BRIGHT_HW_CHANGED) {
382382
ret = led_add_brightness_hw_changed(led_cdev);

0 commit comments

Comments
 (0)