mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-24 03:15:59 +00:00
HID: nvidia-shield: Update Thunderstrike LED instance name to use id
Previously would let led_classdev handle renaming when name collision occurred. Now that an ID allocator is used to uniquely identify multiple Thunderstrike controllers, generate unique led device names. Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
3ab196f882
commit
77fe1fed47
1 changed files with 2 additions and 1 deletions
|
@ -798,7 +798,8 @@ static inline int thunderstrike_led_create(struct thunderstrike *ts)
|
|||
{
|
||||
struct led_classdev *led = &ts->led_dev;
|
||||
|
||||
led->name = "thunderstrike:blue:led";
|
||||
led->name = devm_kasprintf(&ts->base.hdev->dev, GFP_KERNEL,
|
||||
"thunderstrike%d:blue:led", ts->id);
|
||||
led->max_brightness = 1;
|
||||
led->flags = LED_CORE_SUSPENDRESUME;
|
||||
led->brightness_get = &thunderstrike_led_get_brightness;
|
||||
|
|
Loading…
Reference in a new issue