From: Michael Walle <michael@walle.cc>
To: "Álvaro Fernández Rojas" <noltari@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpio: regmap: disable IRQ domain without GPIOLIB_IRQCHIP
Date: Thu, 04 Mar 2021 09:29:05 +0100 [thread overview]
Message-ID: <265ad883fee30b799fd53954876dc567@walle.cc> (raw)
In-Reply-To: <20210304070501.30942-1-noltari@gmail.com>
Am 2021-03-04 08:05, schrieb Álvaro Fernández Rojas:
> The current code doesn't check if GPIOLIB_IRQCHIP is enabled, which
> results in
> a compilation error when trying to build gpio-regmap without having
> selected
> CONFIG_GPIOLIB_IRQCHIP.
>
> Fixes: ebe363197e52 ("gpio: add a reusable generic gpio_chip using
> regmap")
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Nice catch.
However, instead of having that ifdef, commit 6a45b0e2589f ("gpiolib:
Introduce gpiochip_irqchip_add_domain()") could be fixed. That one is
missing a stub if CONFIG_GPIOLIB_IRQCHIP is not defined.
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -624,8 +624,16 @@ void gpiochip_irq_domain_deactivate(struct
irq_domain *domain,
bool gpiochip_irqchip_irq_valid(const struct gpio_chip *gc,
unsigned int offset);
+#ifdef CONFIG_GPIOLIB_IRQCHIP
int gpiochip_irqchip_add_domain(struct gpio_chip *gc,
struct irq_domain *domain);
+#else
+static inline int gpiochip_irqchip_add_domain(struct gpio_chip *gc,
+ struct irq_domain *domain)
+{
+ return 0;
+}
+#endif /* CONFIG_GPIOLIB_IRQCHIP */
Linus, do you agree?
-michael
next prev parent reply other threads:[~2021-03-04 8:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 7:05 [PATCH] gpio: regmap: disable IRQ domain without GPIOLIB_IRQCHIP Álvaro Fernández Rojas
2021-03-04 8:29 ` Michael Walle [this message]
2021-03-04 8:54 ` Linus Walleij
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=265ad883fee30b799fd53954876dc567@walle.cc \
--to=michael@walle.cc \
--cc=andy.shevchenko@gmail.com \
--cc=bgolaszewski@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=noltari@gmail.com \
/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).