gpiolib: Deduplicate forward declarations in consumer.h
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 7 Feb 2023 14:29:50 +0000 (16:29 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 6 Mar 2023 10:33:02 +0000 (12:33 +0200)
The struct fwnode_handle pointer is used in both branches of ifdeffery,
no need to have a copy of the same in each of them, just make it global.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
include/linux/gpio/consumer.h

index 59cb20cfac3d0986784fd76355c4e9703d108dad..a7eb8aa1e54c86ecedf5d3e973c0eed28ebaf780 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/err.h>
 
 struct device;
+struct fwnode_handle;
 struct gpio_desc;
 struct gpio_array;
 
@@ -171,9 +172,6 @@ int gpiod_set_consumer_name(struct gpio_desc *desc, const char *name);
 struct gpio_desc *gpio_to_desc(unsigned gpio);
 int desc_to_gpio(const struct gpio_desc *desc);
 
-/* Child properties interface */
-struct fwnode_handle;
-
 struct gpio_desc *fwnode_gpiod_get_index(struct fwnode_handle *fwnode,
                                         const char *con_id, int index,
                                         enum gpiod_flags flags,
@@ -546,9 +544,6 @@ static inline int desc_to_gpio(const struct gpio_desc *desc)
        return -EINVAL;
 }
 
-/* Child properties interface */
-struct fwnode_handle;
-
 static inline
 struct gpio_desc *fwnode_gpiod_get_index(struct fwnode_handle *fwnode,
                                         const char *con_id, int index,