Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1485255 > unrolled thread
| Started by | David Lechner <david@lechnology.com> |
|---|---|
| First post | 2016-09-16 21:20 +0200 |
| Last post | 2016-09-16 21:20 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v4 2/3] leds: Use macro for max device node name size David Lechner <david@lechnology.com> - 2016-09-16 21:20 +0200
| From | David Lechner <david@lechnology.com> |
|---|---|
| Date | 2016-09-16 21:20 +0200 |
| Subject | [PATCH v4 2/3] leds: Use macro for max device node name size |
| Message-ID | <si6Q2-uW-31@gated-at.bofh.it> |
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>
---
drivers/leds/led-class.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index aa84e5b..731e4eb 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[LEDS_MAX_NAME_SIZE];
int ret;
ret = led_classdev_next_name(led_cdev->name, name, sizeof(name));
--
2.7.4
Back to top | Article view | linux.kernel
csiph-web