summaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorRicardo Ribalda Delgado <ribalda@kernel.org>2020-04-01 11:51:47 +0200
committerPavel Machek <pavel@ucw.cz>2020-04-06 23:12:08 +0200
commit64ed6588c2ea618d3f9ca9d8b365ae4c19f76225 (patch)
tree32306ea43eaf138fa023516b385f114dd56fe692 /drivers/leds
parentleds: make functions easier to understand (diff)
downloadlinux-64ed6588c2ea618d3f9ca9d8b365ae4c19f76225.tar.xz
linux-64ed6588c2ea618d3f9ca9d8b365ae4c19f76225.zip
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: bb4e9af0348d ("leds: core: Add support for composing LED class device names") Signed-off-by: Ricardo Ribalda Delgado <ribalda@kernel.org> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/led-class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index 1fc40e8af75e..3363a6551a70 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -376,7 +376,7 @@ int led_classdev_register_ext(struct device *parent,
if (ret)
dev_warn(parent, "Led %s renamed to %s due to name collision",
- led_cdev->name, dev_name(led_cdev->dev));
+ proposed_name, dev_name(led_cdev->dev));
if (led_cdev->flags & LED_BRIGHT_HW_CHANGED) {
ret = led_add_brightness_hw_changed(led_cdev);