Re: [PATCH 2/2] sound: soc: wm8903: Cut gpio_base data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 18, 2018 at 12:12:33PM -0700, Linus Walleij wrote:
> This variable is only used inside the file, and we should
> never hard-code the GPIO base, so delete this.

Adding the Cirrus people again...  hard coding the GPIO base is needed
for board file based systems if they're using GPIO numbers isn't it?

> 
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> ---
>  sound/soc/codecs/wm8903.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
> index 23e43ff40ded..545512dc4c45 100644
> --- a/sound/soc/codecs/wm8903.c
> +++ b/sound/soc/codecs/wm8903.c
> @@ -144,7 +144,6 @@ struct wm8903_platform_data {
>  
>  	int micdet_delay;      /* Delay after microphone detection (ms) */
>  
> -	int gpio_base;
>  	u32 gpio_cfg[WM8903_NUM_GPIO]; /* Default register values for GPIO pin mux */
>  };
>  
> @@ -1876,17 +1875,12 @@ static const struct gpio_chip wm8903_template_chip = {
>  
>  static void wm8903_init_gpio(struct wm8903_priv *wm8903)
>  {
> -	struct wm8903_platform_data *pdata = wm8903->pdata;
>  	int ret;
>  
>  	wm8903->gpio_chip = wm8903_template_chip;
>  	wm8903->gpio_chip.ngpio = WM8903_NUM_GPIO;
>  	wm8903->gpio_chip.parent = wm8903->dev;
> -
> -	if (pdata->gpio_base)
> -		wm8903->gpio_chip.base = pdata->gpio_base;
> -	else
> -		wm8903->gpio_chip.base = -1;
> +	wm8903->gpio_chip.base = -1;
>  
>  	ret = gpiochip_add_data(&wm8903->gpio_chip, wm8903);
>  	if (ret != 0)
> -- 
> 2.17.1
> 

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux