Remove local usb_gadget_register_driver()/usb_gadget_unregister_driver()
implementation which is implemented in udc-core.c instead if DM_USB_GADGET
is enabled. Add no-op dm_usb_gadget_handle_interrupts() implementation.

Signed-off-by: Marek Vasut <[email protected]>
---
Cc: Angus Ainslie <[email protected]>
Cc: Dmitrii Merkurev <[email protected]>
Cc: Eddie Cai <[email protected]>
Cc: Kever Yang <[email protected]>
Cc: Lukasz Majewski <[email protected]>
Cc: Miquel Raynal <[email protected]>
Cc: Mattijs Korpershoek <[email protected]>
Cc: Nishanth Menon <[email protected]>
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: Philipp Tomsich <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Stefan Roese <[email protected]>
Cc: [email protected]
---
 drivers/usb/host/usb-sandbox.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/usb/host/usb-sandbox.c b/drivers/usb/host/usb-sandbox.c
index d1103dcb2e9..582f72d00c1 100644
--- a/drivers/usb/host/usb-sandbox.c
+++ b/drivers/usb/host/usb-sandbox.c
@@ -124,6 +124,12 @@ static int sandbox_submit_int(struct udevice *bus, struct 
usb_device *udev,
        return ret;
 }
 
+#if CONFIG_IS_ENABLED(DM_USB_GADGET)
+int dm_usb_gadget_handle_interrupts(struct udevice *dev)
+{
+       return 0;
+}
+#else
 int usb_gadget_handle_interrupts(int index)
 {
        return 0;
@@ -144,6 +150,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver 
*driver)
 
        return 0;
 }
+#endif
 
 static int sandbox_alloc_device(struct udevice *dev, struct usb_device *udev)
 {
-- 
2.40.1

Reply via email to