OSDN Git Service

hwmon: pmbus: ucd9000: remove unneeded include
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Thu, 8 Aug 2019 08:01:44 +0000 (10:01 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Sat, 31 Aug 2019 15:04:57 +0000 (08:04 -0700)
commit6f8c8f3c31015808100ee54fc471ff5dffdf1734
tree5bb224ca3f2d649f8be52eda3e5ea4a79775243b
parenta55aa89aab90fae7c815b0551b07be37db359d76
hwmon: pmbus: ucd9000: remove unneeded include

Build bot reports the following build issue after commit 9091373ab7ea
("gpio: remove less important #ifdef around declarations):

   In file included from drivers/hwmon/pmbus/ucd9000.c:19:0:
>> include/linux/gpio/driver.h:576:1: error: redefinition of 'gpiochip_add_pin_range'
    gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
    ^~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/hwmon/pmbus/ucd9000.c:18:0:
   include/linux/gpio.h:245:1: note: previous definition of 'gpiochip_add_pin_range' was here
    gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
    ^~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/hwmon/pmbus/ucd9000.c:19:0:
>> include/linux/gpio/driver.h:583:1: error: redefinition of 'gpiochip_add_pingroup_range'
    gpiochip_add_pingroup_range(struct gpio_chip *chip,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/hwmon/pmbus/ucd9000.c:18:0:
   include/linux/gpio.h:254:1: note: previous definition of 'gpiochip_add_pingroup_range' was here
    gpiochip_add_pingroup_range(struct gpio_chip *chip,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/hwmon/pmbus/ucd9000.c:19:0:
>> include/linux/gpio/driver.h:591:1: error: redefinition of 'gpiochip_remove_pin_ranges'
    gpiochip_remove_pin_ranges(struct gpio_chip *chip)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/hwmon/pmbus/ucd9000.c:18:0:
   include/linux/gpio.h:263:1: note: previous definition of 'gpiochip_remove_pin_ranges' was here
    gpiochip_remove_pin_ranges(struct gpio_chip *chip)

This is caused by conflicting defines from linux/gpio.h and
linux/gpio/driver.h. Drivers should not include both the legacy and
the new API headers. This driver doesn't even use linux/gpio.h so
remove it.

Reported-by: kbuild test robot <lkp@intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Link: https://lore.kernel.org/r/20190808080144.6183-1-brgl@bgdev.pl
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/ucd9000.c