public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] gpio: sysfs: fix forward declaration of struct gpio_device
@ 2023-11-27 19:37 Bartosz Golaszewski
  2023-11-27 19:37 ` [PATCH 2/2] gpio: use a mutex to protect the list of GPIO devices Bartosz Golaszewski
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Bartosz Golaszewski @ 2023-11-27 19:37 UTC (permalink / raw)
  To: Linus Walleij, Andy Shevchenko, Kent Gibson
  Cc: linux-gpio, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

The forward declaration for struct gpio_device should be provided for
both branches of the #ifdef.

Fixes: 08a149c40bdb ("gpiolib: Clean up headers")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 drivers/gpio/gpiolib-sysfs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpiolib-sysfs.h b/drivers/gpio/gpiolib-sysfs.h
index 0f213bdb4732..b794b396d6a5 100644
--- a/drivers/gpio/gpiolib-sysfs.h
+++ b/drivers/gpio/gpiolib-sysfs.h
@@ -3,10 +3,10 @@
 #ifndef GPIOLIB_SYSFS_H
 #define GPIOLIB_SYSFS_H
 
-#ifdef CONFIG_GPIO_SYSFS
-
 struct gpio_device;
 
+#ifdef CONFIG_GPIO_SYSFS
+
 int gpiochip_sysfs_register(struct gpio_device *gdev);
 void gpiochip_sysfs_unregister(struct gpio_device *gdev);
 
-- 
2.40.1


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

end of thread, other threads:[~2023-11-28 16:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-27 19:37 [PATCH 1/2] gpio: sysfs: fix forward declaration of struct gpio_device Bartosz Golaszewski
2023-11-27 19:37 ` [PATCH 2/2] gpio: use a mutex to protect the list of GPIO devices Bartosz Golaszewski
2023-11-28 14:21   ` Linus Walleij
2023-11-28 14:52     ` Bartosz Golaszewski
2023-11-28 15:05       ` Linus Walleij
2023-11-28 16:08   ` Andy Shevchenko
2023-11-28 16:40     ` Bartosz Golaszewski
2023-11-28 14:04 ` [PATCH 1/2] gpio: sysfs: fix forward declaration of struct gpio_device Linus Walleij
2023-11-28 16:06 ` Andy Shevchenko
2023-11-28 16:45 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox