* [PATCH] PCI: amlogic: Fix build failure due to missing gpio header
@ 2019-01-07 17:22 Lorenzo Pieralisi
2019-01-08 15:03 ` Bjorn Helgaas
0 siblings, 1 reply; 2+ messages in thread
From: Lorenzo Pieralisi @ 2019-01-07 17:22 UTC (permalink / raw)
To: linux-pci; +Cc: Corentin Labbe, Lorenzo Pieralisi, Bjorn Helgaas
From: Corentin Labbe <clabbe@baylibre.com>
Building the driver when GPIOLIB=n is not selected is causing the
following compilation failure:
drivers/pci/controller/dwc/pci-meson.c: In function 'meson_pcie_assert_reset':
drivers/pci/controller/dwc/pci-meson.c:290:2: error: implicit declaration of function 'gpiod_set_value_cansleep'; did you mean 'gpio_set_value_cansleep'? [-Werror=implicit-function-declaration]
gpiod_set_value_cansleep(mp->reset_gpio, 0);
^~~~~~~~~~~~~~~~~~~~~~~~
gpio_set_value_cansleep
drivers/pci/controller/dwc/pci-meson.c: In function 'meson_pcie_probe':
drivers/pci/controller/dwc/pci-meson.c:540:19: error: implicit declaration of function 'devm_gpiod_get'; did you mean 'devm_gpio_free'? [-Werror=implicit-function-declaration]
mp->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
^~~~~~~~~~~~~~
devm_gpio_free
drivers/pci/controller/dwc/pci-meson.c:540:48: error: 'GPIOD_OUT_LOW' undeclared (first use in this function); did you mean 'GPIOF_INIT_LOW'?
mp->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
^~~~~~~~~~~~~
GPIOF_INIT_LOW
Add the missing linux/gpio/consumer.h header to fix it.
Fixes: 9c0ef6d34fdb ("PCI: amlogic: Add the Amlogic Meson PCIe
controller driver")
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
[lorenzo.pieralisi@arm.com: commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/pci/controller/dwc/pci-meson.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/controller/dwc/pci-meson.c b/drivers/pci/controller/dwc/pci-meson.c
index 241ebe0c4505..e35e9eaa50ee 100644
--- a/drivers/pci/controller/dwc/pci-meson.c
+++ b/drivers/pci/controller/dwc/pci-meson.c
@@ -8,6 +8,7 @@
#include <linux/clk.h>
#include <linux/delay.h>
+#include <linux/gpio/consumer.h>
#include <linux/of_device.h>
#include <linux/of_gpio.h>
#include <linux/pci.h>
--
2.19.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PCI: amlogic: Fix build failure due to missing gpio header
2019-01-07 17:22 [PATCH] PCI: amlogic: Fix build failure due to missing gpio header Lorenzo Pieralisi
@ 2019-01-08 15:03 ` Bjorn Helgaas
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2019-01-08 15:03 UTC (permalink / raw)
To: Lorenzo Pieralisi; +Cc: linux-pci, Corentin Labbe
On Mon, Jan 07, 2019 at 05:22:23PM +0000, Lorenzo Pieralisi wrote:
> From: Corentin Labbe <clabbe@baylibre.com>
>
> Building the driver when GPIOLIB=n is not selected is causing the
> following compilation failure:
>
> drivers/pci/controller/dwc/pci-meson.c: In function 'meson_pcie_assert_reset':
> drivers/pci/controller/dwc/pci-meson.c:290:2: error: implicit declaration of function 'gpiod_set_value_cansleep'; did you mean 'gpio_set_value_cansleep'? [-Werror=implicit-function-declaration]
> gpiod_set_value_cansleep(mp->reset_gpio, 0);
> ^~~~~~~~~~~~~~~~~~~~~~~~
> gpio_set_value_cansleep
> drivers/pci/controller/dwc/pci-meson.c: In function 'meson_pcie_probe':
> drivers/pci/controller/dwc/pci-meson.c:540:19: error: implicit declaration of function 'devm_gpiod_get'; did you mean 'devm_gpio_free'? [-Werror=implicit-function-declaration]
> mp->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
> ^~~~~~~~~~~~~~
> devm_gpio_free
> drivers/pci/controller/dwc/pci-meson.c:540:48: error: 'GPIOD_OUT_LOW' undeclared (first use in this function); did you mean 'GPIOF_INIT_LOW'?
> mp->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
> ^~~~~~~~~~~~~
> GPIOF_INIT_LOW
>
> Add the missing linux/gpio/consumer.h header to fix it.
>
> Fixes: 9c0ef6d34fdb ("PCI: amlogic: Add the Amlogic Meson PCIe
> controller driver")
> Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
> [lorenzo.pieralisi@arm.com: commit log]
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Applied to for-linus for v5.0, thanks!
> ---
> drivers/pci/controller/dwc/pci-meson.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/controller/dwc/pci-meson.c b/drivers/pci/controller/dwc/pci-meson.c
> index 241ebe0c4505..e35e9eaa50ee 100644
> --- a/drivers/pci/controller/dwc/pci-meson.c
> +++ b/drivers/pci/controller/dwc/pci-meson.c
> @@ -8,6 +8,7 @@
>
> #include <linux/clk.h>
> #include <linux/delay.h>
> +#include <linux/gpio/consumer.h>
> #include <linux/of_device.h>
> #include <linux/of_gpio.h>
> #include <linux/pci.h>
> --
> 2.19.2
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-08 15:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-07 17:22 [PATCH] PCI: amlogic: Fix build failure due to missing gpio header Lorenzo Pieralisi
2019-01-08 15:03 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).