Skip to content

Commit

Permalink
usb: fix dwc3 build when USB_GADGET_DWC3 is not enabled
Browse files Browse the repository at this point in the history
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 <rdunlap@xenotime.net>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Randy Dunlap authored and Greg Kroah-Hartman committed Aug 24, 2011
1 parent 29cc889 commit 096cb25
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/usb/dwc3/gadget.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 096cb25

Please sign in to comment.