summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3/dwc3-generic.c
diff options
context:
space:
mode:
authorSherry Sun <sherry.sun@nxp.com>2019-07-30 20:42:02 -0400
committerYe Li <ye.li@nxp.com>2020-04-26 23:36:23 -0700
commit8e96b7197a91142c9f70d8fed7b994b2e3d8eb1a (patch)
treef4cd491080d967923b0fd121e76bb41712f288a5 /drivers/usb/dwc3/dwc3-generic.c
parentb8d23c9eba14419ccd3b16d403670d4bba2423b1 (diff)
MLK-22357-1 usb: Add handle_interrupts function pointer for UCLASS_USB_GADGET_GENERIC
Since the orginal way to call interrupts handle function of DM usb gadget driver is through dm_usb_gadget_handle_interrupts(), when we want to use two or more different gadget drivers at the same time, it will cause error of duplicate names. So here add a handle_interrupts function pointer instead of driectly call dm_usb_gadget_handle_interrupts(), then the error can be avoided. Signed-off-by: Sherry Sun <sherry.sun@nxp.com> (cherry picked from commit 2458ddd952a6a2d2304dfe7ea34e4192cd1d5ed4)
Diffstat (limited to 'drivers/usb/dwc3/dwc3-generic.c')
-rw-r--r--drivers/usb/dwc3/dwc3-generic.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
index 3e116b2c5cc..ed5a16197c6 100644
--- a/drivers/usb/dwc3/dwc3-generic.c
+++ b/drivers/usb/dwc3/dwc3-generic.c
@@ -108,7 +108,7 @@ static int dwc3_generic_ofdata_to_platdata(struct udevice *dev)
}
#if CONFIG_IS_ENABLED(DM_USB_GADGET)
-int dm_usb_gadget_handle_interrupts(struct udevice *dev)
+static int dwc3_generic_peripheral_handle_interrupts(struct udevice *dev)
{
struct dwc3_generic_priv *priv = dev_get_priv(dev);
struct dwc3 *dwc3 = &priv->dwc3;
@@ -138,6 +138,7 @@ U_BOOT_DRIVER(dwc3_generic_peripheral) = {
.ofdata_to_platdata = dwc3_generic_ofdata_to_platdata,
.probe = dwc3_generic_peripheral_probe,
.remove = dwc3_generic_peripheral_remove,
+ .handle_interrupts = dwc3_generic_peripheral_handle_interrupts,
.priv_auto_alloc_size = sizeof(struct dwc3_generic_priv),
.platdata_auto_alloc_size = sizeof(struct dwc3_generic_plat),
};