The patch titled leds: leds-lp5523: modify the way of setting led device name has been added to the -mm tree. Its filename is leds-leds-lp5523-modify-the-way-of-setting-led-device-name.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: leds: leds-lp5523: modify the way of setting led device name From: Samu Onkalo <samu.p.onkalo@xxxxxxxxx> Currently all leds channels begins with string lp5523. Patch adds a possibility to provide name via platform data. This makes it possible to have several chips without overlapping sysfs names. Signed-off-by: Samu Onkalo <samu.p.onkalo@xxxxxxxxx> Cc: Arun Murthy <arun.murthy@xxxxxxxxxxxxxx> Cc: Ilkka Koskinen <ilkka.koskinen@xxxxxxxxx> Cc: Richard Purdie <rpurdie@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/leds/leds-lp5523.c | 3 ++- include/linux/leds-lp5523.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff -puN drivers/leds/leds-lp5523.c~leds-leds-lp5523-modify-the-way-of-setting-led-device-name drivers/leds/leds-lp5523.c --- a/drivers/leds/leds-lp5523.c~leds-leds-lp5523-modify-the-way-of-setting-led-device-name +++ a/drivers/leds/leds-lp5523.c @@ -870,7 +870,8 @@ static int __init lp5523_init_led(struct return -EINVAL; } - snprintf(name, 32, "lp5523:channel%d", chan); + snprintf(name, sizeof(name), "%s:channel%d", + pdata->label ?: "lp5523", chan); led->cdev.name = name; led->cdev.brightness_set = lp5523_set_brightness; diff -puN include/linux/leds-lp5523.h~leds-leds-lp5523-modify-the-way-of-setting-led-device-name include/linux/leds-lp5523.h --- a/include/linux/leds-lp5523.h~leds-leds-lp5523-modify-the-way-of-setting-led-device-name +++ a/include/linux/leds-lp5523.h @@ -42,6 +42,7 @@ struct lp5523_platform_data { int (*setup_resources)(void); void (*release_resources)(void); void (*enable)(bool state); + const char *label; }; #endif /* __LINUX_LP5523_H */ _ Patches currently in -mm which might be from samu.p.onkalo@xxxxxxxxx are leds-leds-lp5523-modify-the-way-of-setting-led-device-name.patch leds-lp5523-fix-circular-locking.patch leds-lp5521-fix-circular-locking.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html