From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 11 May 2016 13:04:30 +0200 Subject: [U-Boot] [PATCH 01/10] usb: xhci: add struct devrequest declaration to xhci.h In-Reply-To: <1462962515-13181-2-git-send-email-yamada.masahiro@socionext.com> References: <1462962515-13181-1-git-send-email-yamada.masahiro@socionext.com> <1462962515-13181-2-git-send-email-yamada.masahiro@socionext.com> Message-ID: <573311BE.1040004@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 05/11/2016 12:28 PM, Masahiro Yamada wrote: > If xhci.h is included without include/usb.h, the compiler > complains like follows: > warning: 'struct devrequest' declared inside parameter list > > Teach the compiler that devrequest is a structure. > I found no reason include include/usb.h from xhci.h. I still don't like the fact that you would now have to include usb.h in each driver instead of including it in xhci.h once. > Signed-off-by: Masahiro Yamada > --- > > 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; > 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