linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Serge Semin <Sergey.Semin@baikalelectronics.ru>,
	linux-gpio <linux-gpio@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Hoan Tran <hoan@os.amperecomputing.com>,
	Serge Semin <fancer.lancer@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH v1 2/2] gpio: dwapb: Switch to use fwnode_irq_get()
Date: Wed, 2 Jun 2021 15:35:02 +0200	[thread overview]
Message-ID: <CAMpxmJWHH7-40Gc5RCyRMq5v-_Ew8-B_CgrJmZQgtq2N6F5JEA@mail.gmail.com> (raw)
In-Reply-To: <20210601162128.35663-2-andriy.shevchenko@linux.intel.com>

On Tue, Jun 1, 2021 at 6:21 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> We have open coded variant of fwnode_irq_get() in dwapb_get_irq().
> Replace it with a simple call.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/gpio/gpio-dwapb.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
> index 939701c1465e..7d61f5821e32 100644
> --- a/drivers/gpio/gpio-dwapb.c
> +++ b/drivers/gpio/gpio-dwapb.c
> @@ -528,17 +528,13 @@ static int dwapb_gpio_add_port(struct dwapb_gpio *gpio,
>  static void dwapb_get_irq(struct device *dev, struct fwnode_handle *fwnode,
>                           struct dwapb_port_property *pp)
>  {
> -       struct device_node *np = NULL;
> -       int irq = -ENXIO, j;
> -
> -       if (fwnode_property_read_bool(fwnode, "interrupt-controller"))
> -               np = to_of_node(fwnode);
> +       int irq, j;
>
>         for (j = 0; j < pp->ngpio; j++) {
> -               if (np)
> -                       irq = of_irq_get(np, j);
> -               else if (has_acpi_companion(dev))
> +               if (has_acpi_companion(dev))
>                         irq = platform_get_irq_optional(to_platform_device(dev), j);
> +               else
> +                       irq = fwnode_irq_get(fwnode, j);
>                 if (irq > 0)
>                         pp->irq[j] = irq;
>         }
> --
> 2.30.2
>

Applied, thanks!

Bart

  reply	other threads:[~2021-06-02 13:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 16:21 [PATCH v1 1/2] gpio: dwapb: Drop redundant check in dwapb_irq_set_type() Andy Shevchenko
2021-06-01 16:21 ` [PATCH v1 2/2] gpio: dwapb: Switch to use fwnode_irq_get() Andy Shevchenko
2021-06-02 13:35   ` Bartosz Golaszewski [this message]
2021-06-02 14:05   ` Serge Semin
2021-06-02 15:41     ` Andy Shevchenko
2021-06-02 13:34 ` [PATCH v1 1/2] gpio: dwapb: Drop redundant check in dwapb_irq_set_type() Bartosz Golaszewski
2021-06-02 14:07 ` Serge Semin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMpxmJWHH7-40Gc5RCyRMq5v-_Ew8-B_CgrJmZQgtq2N6F5JEA@mail.gmail.com \
    --to=bgolaszewski@baylibre.com \
    --cc=Sergey.Semin@baikalelectronics.ru \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=fancer.lancer@gmail.com \
    --cc=hoan@os.amperecomputing.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).