Skip to content

Commit 91e5ae9

Browse files
committed
gpiolib: Deduplicate forward declarations in consumer.h
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>
1 parent 6cfd84c commit 91e5ae9

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

include/linux/gpio/consumer.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <linux/err.h>
99

1010
struct device;
11+
struct fwnode_handle;
1112
struct gpio_desc;
1213
struct gpio_array;
1314

@@ -171,9 +172,6 @@ int gpiod_set_consumer_name(struct gpio_desc *desc, const char *name);
171172
struct gpio_desc *gpio_to_desc(unsigned gpio);
172173
int desc_to_gpio(const struct gpio_desc *desc);
173174

174-
/* Child properties interface */
175-
struct fwnode_handle;
176-
177175
struct gpio_desc *fwnode_gpiod_get_index(struct fwnode_handle *fwnode,
178176
const char *con_id, int index,
179177
enum gpiod_flags flags,
@@ -546,9 +544,6 @@ static inline int desc_to_gpio(const struct gpio_desc *desc)
546544
return -EINVAL;
547545
}
548546

549-
/* Child properties interface */
550-
struct fwnode_handle;
551-
552547
static inline
553548
struct gpio_desc *fwnode_gpiod_get_index(struct fwnode_handle *fwnode,
554549
const char *con_id, int index,

0 commit comments

Comments
 (0)