Re: [PATCH] pinctrl: sirf: atlas7: Initialize GPIO offset

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

 



On Thu, Jul 20, 2017 at 07:01:07PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@xxxxxxxxxx>
> 
> The GPIO offset is never initialized, which means that it will end up
> being zero as per the devm_kzalloc() of the parent structure.
> 
> Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>
> ---
> I have no idea how the driver could've ever worked for anything other
> than instances with a single bank, but maybe it did and I missed some
> detail.
> 
>  drivers/pinctrl/sirf/pinctrl-atlas7.c | 1 +
>  1 file changed, 1 insertion(+)

Any comments on this one?

Thierry

> 
> diff --git a/drivers/pinctrl/sirf/pinctrl-atlas7.c b/drivers/pinctrl/sirf/pinctrl-atlas7.c
> index 36b5c8d5471e..a2ca4a9472c7 100644
> --- a/drivers/pinctrl/sirf/pinctrl-atlas7.c
> +++ b/drivers/pinctrl/sirf/pinctrl-atlas7.c
> @@ -6078,6 +6078,7 @@ static int atlas7_gpio_probe(struct platform_device *pdev)
>  		bank = &a7gc->banks[idx];
>  		/* Set ctrl registers' base of this bank */
>  		bank->base = ATLAS7_GPIO_BASE(a7gc, idx);
> +		bank->gpio_offset = idx * NGPIO_OF_BANK;
>  
>  		/* Get interrupt number from DTS */
>  		ret = of_irq_get(np, idx);
> -- 
> 2.13.3
> 

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux