pci: tegra: use correct gpio/consumer.h header
diff mbox series

Message ID 20190628102953.2369879-1-arnd@arndb.de
State New
Headers show
Series
  • pci: tegra: use correct gpio/consumer.h header
Related show

Commit Message

Arnd Bergmann June 28, 2019, 10:29 a.m. UTC
linux/gpio.h is not the correct header for modern interfaces and
causes a build failure without CONFIG_GPIOLIB:

drivers/pci/controller/pci-tegra.c: In function 'tegra_pcie_port_reset':
drivers/pci/controller/pci-tegra.c:551:3: error: implicit declaration of function 'gpiod_set_value'; did you mean 'gpio_set_value'? [-Werror=implicit-function-declaration]
   gpiod_set_value(port->reset_gpio, 1);
   ^~~~~~~~~~~~~~~

Use linux/gpio/consumer.h instead.

Fixes: 5e5e9c23f82a ("PCI: tegra: Add support for GPIO based PERST#")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/pci/controller/pci-tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lorenzo Pieralisi June 28, 2019, 10:46 a.m. UTC | #1
On Fri, Jun 28, 2019 at 12:29:45PM +0200, Arnd Bergmann wrote:
> linux/gpio.h is not the correct header for modern interfaces and
> causes a build failure without CONFIG_GPIOLIB:
> 
> drivers/pci/controller/pci-tegra.c: In function 'tegra_pcie_port_reset':
> drivers/pci/controller/pci-tegra.c:551:3: error: implicit declaration of function 'gpiod_set_value'; did you mean 'gpio_set_value'? [-Werror=implicit-function-declaration]
>    gpiod_set_value(port->reset_gpio, 1);
>    ^~~~~~~~~~~~~~~
> 
> Use linux/gpio/consumer.h instead.
> 
> Fixes: 5e5e9c23f82a ("PCI: tegra: Add support for GPIO based PERST#")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/pci/controller/pci-tegra.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Squashed in the respective commit in pci/tegra, thanks for the fix
Arnd.

Lorenzo

> diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c
> index 9cc03a2549c0..1775b88c0aec 100644
> --- a/drivers/pci/controller/pci-tegra.c
> +++ b/drivers/pci/controller/pci-tegra.c
> @@ -17,7 +17,7 @@
>  #include <linux/debugfs.h>
>  #include <linux/delay.h>
>  #include <linux/export.h>
> -#include <linux/gpio.h>
> +#include <linux/gpio/consumer.h>
>  #include <linux/interrupt.h>
>  #include <linux/iopoll.h>
>  #include <linux/irq.h>
> -- 
> 2.20.0
>

Patch
diff mbox series

diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c
index 9cc03a2549c0..1775b88c0aec 100644
--- a/drivers/pci/controller/pci-tegra.c
+++ b/drivers/pci/controller/pci-tegra.c
@@ -17,7 +17,7 @@ 
 #include <linux/debugfs.h>
 #include <linux/delay.h>
 #include <linux/export.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/interrupt.h>
 #include <linux/iopoll.h>
 #include <linux/irq.h>