linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: dwc3: xilinx: include linux/gpio/consumer.h
@ 2023-01-03 12:17 Arnd Bergmann
  2023-01-04 11:12 ` Michal Simek
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2023-01-03 12:17 UTC (permalink / raw)
  To: Thinh Nguyen, Greg Kroah-Hartman, Michal Simek, Piyush Mehta
  Cc: Arnd Bergmann, Robert Hancock, Piyush Mehta, linux-usb,
	linux-arm-kernel, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The newly added gpio consumer calls cause a build failure in configurations
that fail to include the right header implicitly:

drivers/usb/dwc3/dwc3-xilinx.c: In function 'dwc3_xlnx_init_zynqmp':
drivers/usb/dwc3/dwc3-xilinx.c:207:22: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_clk_get_optional'? [-Werror=implicit-function-declaration]
  207 |         reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
      |                      devm_clk_get_optional

Fixes: ca05b38252d7 ("usb: dwc3: xilinx: Add gpio-reset support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/usb/dwc3/dwc3-xilinx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/dwc3/dwc3-xilinx.c b/drivers/usb/dwc3/dwc3-xilinx.c
index 8607d4c23283..0745e9f11b2e 100644
--- a/drivers/usb/dwc3/dwc3-xilinx.c
+++ b/drivers/usb/dwc3/dwc3-xilinx.c
@@ -13,6 +13,7 @@
 #include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
+#include <linux/gpio/consumer.h>
 #include <linux/of_gpio.h>
 #include <linux/of_platform.h>
 #include <linux/pm_runtime.h>
-- 
2.39.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: dwc3: xilinx: include linux/gpio/consumer.h
  2023-01-03 12:17 [PATCH] usb: dwc3: xilinx: include linux/gpio/consumer.h Arnd Bergmann
@ 2023-01-04 11:12 ` Michal Simek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2023-01-04 11:12 UTC (permalink / raw)
  To: Arnd Bergmann, Thinh Nguyen, Greg Kroah-Hartman, Michal Simek,
	Piyush Mehta
  Cc: Arnd Bergmann, Robert Hancock, Piyush Mehta, linux-usb,
	linux-arm-kernel, linux-kernel



On 1/3/23 13:17, Arnd Bergmann wrote:
> 
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The newly added gpio consumer calls cause a build failure in configurations
> that fail to include the right header implicitly:

I think it would be better to say what you have done exactly to make sure that 
developers will run it before they send the patch.


> 
> drivers/usb/dwc3/dwc3-xilinx.c: In function 'dwc3_xlnx_init_zynqmp':
> drivers/usb/dwc3/dwc3-xilinx.c:207:22: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_clk_get_optional'? [-Werror=implicit-function-declaration]
>    207 |         reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
>        |                      ^~~~~~~~~~~~~~~~~~~~~~~
>        |                      devm_clk_get_optional
> 
> Fixes: ca05b38252d7 ("usb: dwc3: xilinx: Add gpio-reset support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   drivers/usb/dwc3/dwc3-xilinx.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/dwc3/dwc3-xilinx.c b/drivers/usb/dwc3/dwc3-xilinx.c
> index 8607d4c23283..0745e9f11b2e 100644
> --- a/drivers/usb/dwc3/dwc3-xilinx.c
> +++ b/drivers/usb/dwc3/dwc3-xilinx.c
> @@ -13,6 +13,7 @@
>   #include <linux/of.h>
>   #include <linux/platform_device.h>
>   #include <linux/dma-mapping.h>
> +#include <linux/gpio/consumer.h>
>   #include <linux/of_gpio.h>

Origin patch added this header and I think it should be also removed as the part 
of this patch.


>   #include <linux/of_platform.h>
>   #include <linux/pm_runtime.h>
> --
> 2.39.0
> 

Thanks,
Michal

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-04 11:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-03 12:17 [PATCH] usb: dwc3: xilinx: include linux/gpio/consumer.h Arnd Bergmann
2023-01-04 11:12 ` Michal Simek

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).