From: Randy Dunlap Date: Tue, 23 Aug 2011 19:52:47 +0000 (-0700) Subject: usb: fix dwc3 build when USB_GADGET_DWC3 is not enabled X-Git-Tag: MMI-PSA29.97-13-9~18248^2~179^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=096cb25d624289a054c9e4d0537c26c0a5eff487;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git usb: fix dwc3 build when USB_GADGET_DWC3 is not enabled Fix build error when CONFIG_USB_GADGET_DWC3 is not enabled: ERROR: "dwc3_send_gadget_ep_cmd" [drivers/usb/dwc3/dwc3.ko] undefined! Signed-off-by: Randy Dunlap Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/dwc3/gadget.h b/drivers/usb/dwc3/gadget.h index ccfc109f0902..4809ac8d9a79 100644 --- a/drivers/usb/dwc3/gadget.h +++ b/drivers/usb/dwc3/gadget.h @@ -202,6 +202,11 @@ void dwc3_gadget_exit(struct dwc3 *dwc); #else static inline int dwc3_gadget_init(struct dwc3 *dwc) { return 0; } static inline void dwc3_gadget_exit(struct dwc3 *dwc) { } +static inline int dwc3_send_gadget_ep_cmd(struct dwc3 *dwc, unsigned ep, + unsigned cmd, struct dwc3_gadget_ep_cmd_params *params) +{ + return 0; +} #endif void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req,