Skip to contentSkip to conversation

hwmon: pmbus: ucd9000: remove unneeded include

PATCH Applied Bartosz Golaszewski 2 participants 2 messages Aug 8, 2019 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: pmbus: ucd9000: remove unneeded include

From: Bartosz Golaszewski <[email protected]>

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:

Quoted 1 line
Quoted 1 line

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:

Quoted 1 line
Quoted 1 line

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:

Quoted 1 line
Quoted 1 line

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.

---
 drivers/hwmon/pmbus/ucd9000.c | 1 -
 1 file changed, 1 deletion(-)
drivers/hwmon/pmbus/ucd9000.c +0 -1
index c846759bc1c0..a9229c6b0e84 100644
@@ -15,7 +15,6 @@
 #include <linux/slab.h>
 #include <linux/i2c.h>
 #include <linux/pmbus.h>
-#include <linux/gpio.h>
 #include <linux/gpio/driver.h>
 #include "pmbus.h"
 
Signature · 1 line
2.21.0
maintainer Applied
#1 lore raw
Quoted 29 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

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:

Quoted 1 line
Quoted 1 line

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:

Quoted 1 line
Quoted 1 line

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:

Quoted 1 line
Quoted 1 line

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)

Quoted 8 lines

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.

Applied.

Thanks,
Guenter

Quoted 16 lines
---
 drivers/hwmon/pmbus/ucd9000.c | 1 -
 1 file changed, 1 deletion(-)
drivers/hwmon/pmbus/ucd9000.c +0 -1
index c846759bc1c0..a9229c6b0e84 100644
@@ -15,7 +15,6 @@
 #include <linux/slab.h>
 #include <linux/i2c.h>
 #include <linux/pmbus.h>
-#include <linux/gpio.h>
 #include <linux/gpio/driver.h>
 #include "pmbus.h"