linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] gpiolib: add gpiod_to_gpio_device() stub for !GPIOLIB
@ 2024-01-25  8:15 Krzysztof Kozlowski
  2024-01-25  8:16 ` [PATCH 2/3] gpiolib: add gpio_device_get_base() " Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-25  8:15 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Peter Rosin, linux-gpio,
	linux-kernel
  Cc: Krzysztof Kozlowski, stable, Philipp Zabel

Add empty stub of gpiod_to_gpio_device() when GPIOLIB is not enabled.

Cc: <stable@vger.kernel.org>
Fixes: 370232d096e3 ("gpiolib: provide gpiod_to_gpio_device()")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Cc: Philipp Zabel <p.zabel@pengutronix.de>
---
 include/linux/gpio/driver.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index 9a5c6c76e653..012797e7106d 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -819,6 +819,12 @@ static inline struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc)
 	return ERR_PTR(-ENODEV);
 }
 
+static inline struct gpio_device *gpiod_to_gpio_device(struct gpio_desc *desc)
+{
+	WARN_ON(1);
+	return ERR_PTR(-ENODEV);
+}
+
 static inline int gpiochip_lock_as_irq(struct gpio_chip *gc,
 				       unsigned int offset)
 {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-01-31  9:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-25  8:15 [PATCH 1/3] gpiolib: add gpiod_to_gpio_device() stub for !GPIOLIB Krzysztof Kozlowski
2024-01-25  8:16 ` [PATCH 2/3] gpiolib: add gpio_device_get_base() " Krzysztof Kozlowski
2024-01-25  8:16 ` [PATCH 3/3] gpiolib: add gpio_device_get_label() " Krzysztof Kozlowski
2024-01-25  9:04   ` Bartosz Golaszewski
2024-01-25  9:14     ` Krzysztof Kozlowski
2024-01-25  9:28       ` Bartosz Golaszewski
2024-01-25  9:34         ` Philipp Zabel
2024-01-25  8:36 ` [PATCH 1/3] gpiolib: add gpiod_to_gpio_device() " Bartosz Golaszewski
2024-01-25  8:59   ` Krzysztof Kozlowski
2024-01-31  9:00     ` Linus Walleij

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).