forked from mirrors/linux
		
	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>
This commit is contained in:
		
							parent
							
								
									e381322b01
								
							
						
					
					
						commit
						eb1ce74699
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -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)); | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 David Lechner
						David Lechner