[U-Boot] [PATCH] usb: xhci: add struct devrequest declaration

Marek Vasut marex at denx.de
Fri May 6 12:50:10 CEST 2016


On 05/06/2016 12:36 PM, Masahiro Yamada wrote:
> This should be declared for xhci_ctrl_tx() to avoid build error.

Can you please include the build error in the commit message ?
That is extremely useful.

> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
> ---
> 
>  drivers/usb/host/xhci.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
> index 2afa386..16dd61a 100644
> --- a/drivers/usb/host/xhci.h
> +++ b/drivers/usb/host/xhci.h
> @@ -1252,6 +1252,8 @@ void xhci_acknowledge_event(struct xhci_ctrl *ctrl);
>  union xhci_trb *xhci_wait_for_event(struct xhci_ctrl *ctrl, trb_type expected);
>  int xhci_bulk_tx(struct usb_device *udev, unsigned long pipe,
>  		 int length, void *buffer);
> +
> +struct devrequest;

I don't think that's the right thing to do, since the structure
devrequest is not defined anywhere in this file or the headers
which are included in this file.

Will this patch work for you instead? It includes usb.h , which
defines the struct devrequest.

--->8---
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 2afa386..b5a2ea5 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -22,6 +22,7 @@
 #include <asm/io.h>
 #include <linux/list.h>
 #include <linux/compat.h>
+#include <usb.h>

 #define MAX_EP_CTX_NUM         31
 #define XHCI_ALIGNMENT         64
---8<---

>  int xhci_ctrl_tx(struct usb_device *udev, unsigned long pipe,
>  		 struct devrequest *req, int length, void *buffer);
>  int xhci_check_maxpacket(struct usb_device *udev);
> 


-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list