Re: [PATCH 1/1] gpio: mxc: remove static allocation of GPIO base

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

 



On Tue, Feb 14, 2023 at 11:47 PM Shenwei Wang <shenwei.wang@xxxxxxx> wrote:
>
> The latest gpio driver framework will give the following warning
> when it detects the static allocation of the GPIO bases.
>
> "[    1.329312] gpio gpiochip0: Static allocation of GPIO base is
> deprecated, use dynamic allocation."
>
> This patch removes the static allocation of GPIO base to get rid
> of the warning message.
>
> Signed-off-by: Shenwei Wang <shenwei.wang@xxxxxxx>
> ---
>  drivers/gpio/gpio-mxc.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
> index d5626c572d24..07948175441c 100644
> --- a/drivers/gpio/gpio-mxc.c
> +++ b/drivers/gpio/gpio-mxc.c
> @@ -450,8 +450,6 @@ static int mxc_gpio_probe(struct platform_device *pdev)
>         port->gc.request = gpiochip_generic_request;
>         port->gc.free = gpiochip_generic_free;
>         port->gc.to_irq = mxc_gpio_to_irq;
> -       port->gc.base = (pdev->id < 0) ? of_alias_get_id(np, "gpio") * 32 :
> -                                            pdev->id * 32;
>
>         err = devm_gpiochip_add_data(&pdev->dev, &port->gc, port);
>         if (err)
> --
> 2.34.1
>

This is one of the drivers for which we can't do it yet:
https://lore.kernel.org/linux-gpio/20230120104647.nwki4silrtd7bt3w@xxxxxxxxxxxxxx/

Bart



[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