lkml.org 
[lkml]   [2019]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 01/26] ALSA: line6: Avoid polluting led_* namespace
On Wed, 17 Apr 2019 22:54:14 +0200,
Jacek Anaszewski wrote:
>
> led_colors clashes with the array of the same name being added
> to the LED class. Do the following amendments to fix this issue
> and the other prospective one.
>
> led_colors -> toneport_led_colors
> led_init_vals -> toneport_led_init_vals
>
> Fixes: f44edd7b2bbed ("ALSA: line6/toneport: Implement LED controls via LED class")
> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: Takashi Iwai <tiwai@suse.com>
> Cc: Arnd Bergmann <arnd@arndb.de>

Looks good.

Feel free to take my ack:
Reviewed-by: Takashi Iwai <tiwai@suse.de>


thanks,

Takashi

> ---
> sound/usb/line6/toneport.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/sound/usb/line6/toneport.c b/sound/usb/line6/toneport.c
> index f47ba94e6f4a..56875526b182 100644
> --- a/sound/usb/line6/toneport.c
> +++ b/sound/usb/line6/toneport.c
> @@ -291,8 +291,8 @@ static bool toneport_has_led(struct usb_line6_toneport *toneport)
> }
> }
>
> -static const char * const led_colors[2] = { "red", "green" };
> -static const int led_init_vals[2] = { 0x00, 0x26 };
> +static const char * const toneport_led_colors[2] = { "red", "green" };
> +static const int toneport_led_init_vals[2] = { 0x00, 0x26 };
>
> static void toneport_update_led(struct usb_line6_toneport *toneport)
> {
> @@ -320,9 +320,9 @@ static int toneport_init_leds(struct usb_line6_toneport *toneport)
>
> led->toneport = toneport;
> snprintf(led->name, sizeof(led->name), "%s::%s",
> - dev_name(dev), led_colors[i]);
> + dev_name(dev), toneport_led_colors[i]);
> leddev->name = led->name;
> - leddev->brightness = led_init_vals[i];
> + leddev->brightness = toneport_led_init_vals[i];
> leddev->max_brightness = 0x26;
> leddev->brightness_set = toneport_led_brightness_set;
> err = led_classdev_register(dev, leddev);
> --
> 2.11.0
>
>

\
 
 \ /
  Last update: 2019-04-18 07:19    [W:0.203 / U:0.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site