[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMpxmJVrYS1FT0DUdY40D0AZFtjRqrSihj6CO-Z+RCLpZ82t3Q@mail.gmail.com>
Date: Tue, 19 Jan 2021 11:51:50 +0100
From: Bartosz Golaszewski <bgolaszewski@...libre.com>
To: Nikita Shubin <nikita.shubin@...uefel.me>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Grygorii Strashko <grygorii.strashko@...com>,
Thierry Reding <treding@...dia.com>,
linux-gpio <linux-gpio@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] gpiolib: warning on gpiochip->to_irq defined
On Mon, Jan 18, 2021 at 10:05 AM Nikita Shubin
<nikita.shubin@...uefel.me> wrote:
>
> gpiochip->to_irq method is redefined in gpiochip_add_irqchip.
>
> A lot of gpiod driver's still define ->to_irq method, let's give
> a gentle warning that they can no longer rely on it, so they can remove
> it on ocassion.
>
> Fixes: e0d8972898139 ("gpio: Implement tighter IRQ chip integration")
> Signed-off-by: Nikita Shubin <nikita.shubin@...uefel.me>
> ---
> v1->v2:
> - Change chip_err to chip_warn
> ---
> drivers/gpio/gpiolib.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index 5ce0c14c637b..5a9410c2537d 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -1489,6 +1489,9 @@ static int gpiochip_add_irqchip(struct gpio_chip *gc,
> type = IRQ_TYPE_NONE;
> }
>
> + if (gc->to_irq)
> + chip_warn(gc, "to_irq is redefined in %s and you shouldn't rely on it\n", __func__);
> +
> gc->to_irq = gpiochip_to_irq;
> gc->irq.default_type = type;
> gc->irq.lock_key = lock_key;
> --
> 2.29.2
>
Applied to fixes, thanks!
Bartosz
Powered by blists - more mailing lists