summaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorDavid Lechner <david@lechnology.com>2016-09-16 14:16:49 -0500
committerJacek Anaszewski <j.anaszewski@samsung.com>2016-11-22 12:07:02 +0100
commiteb1ce7469940b4eb8a466d9ae4d032fb2c9969dc (patch)
tree49f6ded1f5c2df9f768d48859c40d181873d074d /drivers/leds
parente381322b0190c1253d347de3f28b5c37756fb651 (diff)
downloadlinux-eb1ce7469940b4eb8a466d9ae4d032fb2c9969dc.tar.bz2
leds: Use macro for max device node name size
Use a macro instead of hard-coding the max device node name size. The uleds driver introduced a macro for this value, so using it. Signed-off-by: David Lechner <david@lechnology.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/led-class.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index aa84e5b37593..d946eb166781 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -20,6 +20,7 @@
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/timer.h>
+#include <uapi/linux/uleds.h>
#include "leds.h"
static struct class *leds_class;
@@ -187,7 +188,7 @@ static int led_classdev_next_name(const char *init_name, char *name,
*/
int led_classdev_register(struct device *parent, struct led_classdev *led_cdev)
{
- char name[64];
+ char name[LED_MAX_NAME_SIZE];
int ret;
ret = led_classdev_next_name(led_cdev->name, name, sizeof(name));