Skip to content

Commit

Permalink
gpio: Fix build warnings on undefined struct pinctrl_dev
Browse files Browse the repository at this point in the history
This fixes the warnings:

* include/linux/gpio.h:254:11: warning: 'struct pinctrl_dev' declared
  inside parameter list will not be visible outside of this definition
  or declaration
* include/linux/gpio/driver.h:602:11: warning: 'struct pinctrl_dev'
  declared inside parameter list will not be visible outside of this
  definition or declaration

Fixes: 78b9957 ("pinctrl: remove unused pin_is_valid()")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Enrico Weigelt <info@metux.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Enrico Weigelt authored and Linus Walleij committed Jun 13, 2019
1 parent 2e80e10 commit d664c43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/linux/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ void devm_gpio_free(struct device *dev, unsigned int gpio);

struct device;
struct gpio_chip;
struct pinctrl_dev;

static inline bool gpio_is_valid(int number)
{
Expand Down
2 changes: 2 additions & 0 deletions include/linux/gpio/driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,8 @@ void gpiochip_remove_pin_ranges(struct gpio_chip *chip);

#else

struct pinctrl_dev;

static inline int
gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
unsigned int gpio_offset, unsigned int pin_offset,
Expand Down

0 comments on commit d664c43

Please sign in to comment.