summaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@iki.fi>2015-03-27 00:42:06 +0100
committerBryan Wu <cooloney@gmail.com>2015-03-30 23:26:32 +0200
commitccdc45075aeaaa144af4177b85570eb26c2f5a8b (patch)
tree1c6fa0f53bb4e9f6191fb5eca820cf1ebbb869a6 /drivers/leds
parentleds: Use log level warn instead of info when telling about a name clash (diff)
downloadlinux-ccdc45075aeaaa144af4177b85570eb26c2f5a8b.tar.xz
linux-ccdc45075aeaaa144af4177b85570eb26c2f5a8b.zip
leds: Don't treat the LED name as a format string
The LED name was wrongly interpreted as format string. Stop doing that. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Bryan Wu <cooloney@gmail.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
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 82e3844c185c..728681debdbe 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -252,7 +252,7 @@ int led_classdev_register(struct device *parent, struct led_classdev *led_cdev)
return ret;
led_cdev->dev = device_create_with_groups(leds_class, parent, 0,
- led_cdev, led_cdev->groups, name);
+ led_cdev, led_cdev->groups, "%s", name);
if (IS_ERR(led_cdev->dev))
return PTR_ERR(led_cdev->dev);