mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 1/2] fixup! gpio: fix static inline stub selection
Date: Tue,  7 Jan 2025 07:49:44 +0100	[thread overview]
Message-ID: <20250107064945.2785670-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20250107064945.2785670-1-a.fatoum@pengutronix.de>

gpiod_count depends on OFDEVICE, but the stub was so far only defined
for CONFIG_GPIOLIB-less systems ignoring OFDEVICE. Move it into the
correct #ifdef branch to fix CI failure.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/linux/gpio/consumer.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h
index c5c9e14e4053..7dfac56239eb 100644
--- a/include/linux/gpio/consumer.h
+++ b/include/linux/gpio/consumer.h
@@ -66,6 +66,8 @@ struct gpio_desc *__must_check gpiod_get_index_optional(struct device *dev,
 							unsigned int index,
 							enum gpiod_flags flags);
 
+int gpiod_count(struct device *dev, const char *con_id);
+
 struct gpio_descs *__must_check gpiod_get_array(struct device *dev,
 						const char *con_id,
 						enum gpiod_flags flags);
@@ -96,6 +98,11 @@ gpiod_get_index_optional(struct device *dev, const char *con_id,
 	return NULL;
 }
 
+static inline int gpiod_count(struct device *dev, const char *con_id)
+{
+	return 0;
+}
+
 static inline struct gpio_descs *__must_check
 gpiod_get_array(struct device *dev, const char *con_id, enum gpiod_flags flags)
 {
@@ -122,8 +129,6 @@ void gpiod_put(struct gpio_desc *desc);
 
 int gpiod_set_consumer_name(struct gpio_desc *desc, const char *name);
 
-int gpiod_count(struct device *dev, const char *con_id);
-
 void gpiod_put_array(struct gpio_descs *descs);
 
 int gpiod_set_array_value(unsigned int array_size,
@@ -204,11 +209,6 @@ static inline int gpiod_set_consumer_name(struct gpio_desc *desc,
 	return -EINVAL;
 }
 
-static inline int gpiod_count(struct device *dev, const char *con_id)
-{
-	return 0;
-}
-
 static inline void gpiod_put_array(struct gpio_descs *descs)
 {
 	/* GPIO can never have been requested */
-- 
2.39.5




  reply	other threads:[~2025-01-07  6:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-07  6:49 [PATCH 0/2] Fix next build breakage in CI Ahmad Fatoum
2025-01-07  6:49 ` Ahmad Fatoum [this message]
2025-01-07  6:49 ` [PATCH 2/2] sandbox: os: define referenced config symbols Ahmad Fatoum
2025-01-07  7:48   ` (subset) " Sascha Hauer

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=20250107064945.2785670-2-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.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