usb: dwc3-msm: Allow compilation when USB_GADGET=n
Fix link errors when USB_GADGET=n which causes dwc3/gadget.c not to be built. These symbols are only used in the msm_ep_config/ unconfig functions so we can conditionally compile them. Signed-off-by: Jack Pham <jackp@codeaurora.org>
This commit is contained in:
parent
7a587d7f46
commit
01e29a0238
2 changed files with 9 additions and 3 deletions
|
@ -1172,6 +1172,8 @@ int dwc3_gadget_set_link_state(struct dwc3 *dwc, enum dwc3_link_state state);
|
||||||
int dwc3_send_gadget_ep_cmd(struct dwc3 *dwc, unsigned ep,
|
int dwc3_send_gadget_ep_cmd(struct dwc3 *dwc, unsigned ep,
|
||||||
unsigned cmd, struct dwc3_gadget_ep_cmd_params *params);
|
unsigned cmd, struct dwc3_gadget_ep_cmd_params *params);
|
||||||
int dwc3_send_gadget_generic_command(struct dwc3 *dwc, unsigned cmd, u32 param);
|
int dwc3_send_gadget_generic_command(struct dwc3 *dwc, unsigned cmd, u32 param);
|
||||||
|
void dwc3_gadget_enable_irq(struct dwc3 *dwc);
|
||||||
|
void dwc3_gadget_disable_irq(struct dwc3 *dwc);
|
||||||
#else
|
#else
|
||||||
static inline int dwc3_gadget_init(struct dwc3 *dwc)
|
static inline int dwc3_gadget_init(struct dwc3 *dwc)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
|
@ -1193,6 +1195,10 @@ static inline int dwc3_send_gadget_ep_cmd(struct dwc3 *dwc, unsigned ep,
|
||||||
static inline int dwc3_send_gadget_generic_command(struct dwc3 *dwc,
|
static inline int dwc3_send_gadget_generic_command(struct dwc3 *dwc,
|
||||||
int cmd, u32 param)
|
int cmd, u32 param)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
|
static inline void dwc3_gadget_enable_irq(struct dwc3 *dwc)
|
||||||
|
{ }
|
||||||
|
static inline void dwc3_gadget_disable_irq(struct dwc3 *dwc)
|
||||||
|
{ }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* power management interface */
|
/* power management interface */
|
||||||
|
@ -1229,9 +1235,6 @@ void dwc3_post_host_reset_core_init(struct dwc3 *dwc);
|
||||||
int dwc3_event_buffers_setup(struct dwc3 *dwc);
|
int dwc3_event_buffers_setup(struct dwc3 *dwc);
|
||||||
void dwc3_usb3_phy_suspend(struct dwc3 *dwc, int suspend);
|
void dwc3_usb3_phy_suspend(struct dwc3 *dwc, int suspend);
|
||||||
|
|
||||||
void dwc3_gadget_enable_irq(struct dwc3 *dwc);
|
|
||||||
void dwc3_gadget_disable_irq(struct dwc3 *dwc);
|
|
||||||
|
|
||||||
extern void dwc3_set_notifier(
|
extern void dwc3_set_notifier(
|
||||||
void (*notify) (struct dwc3 *dwc3, unsigned event));
|
void (*notify) (struct dwc3 *dwc3, unsigned event));
|
||||||
extern int dwc3_notify_event(struct dwc3 *dwc3, unsigned event);
|
extern int dwc3_notify_event(struct dwc3 *dwc3, unsigned event);
|
||||||
|
|
|
@ -392,6 +392,7 @@ static inline bool dwc3_msm_is_superspeed(struct dwc3_msm *mdwc)
|
||||||
return dwc3_msm_is_dev_superspeed(mdwc);
|
return dwc3_msm_is_dev_superspeed(mdwc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if IS_ENABLED(CONFIG_USB_DWC3_GADGET) || IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE)
|
||||||
/**
|
/**
|
||||||
* Configure the DBM with the BAM's data fifo.
|
* Configure the DBM with the BAM's data fifo.
|
||||||
* This function is called by the USB BAM Driver
|
* This function is called by the USB BAM Driver
|
||||||
|
@ -1429,6 +1430,8 @@ int msm_ep_unconfig(struct usb_ep *ep)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(msm_ep_unconfig);
|
EXPORT_SYMBOL(msm_ep_unconfig);
|
||||||
|
#endif /* (CONFIG_USB_DWC3_GADGET) || (CONFIG_USB_DWC3_DUAL_ROLE) */
|
||||||
|
|
||||||
static void dwc3_resume_work(struct work_struct *w);
|
static void dwc3_resume_work(struct work_struct *w);
|
||||||
|
|
||||||
static void dwc3_restart_usb_work(struct work_struct *w)
|
static void dwc3_restart_usb_work(struct work_struct *w)
|
||||||
|
|
Loading…
Add table
Reference in a new issue