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.

Reviewed-by: Mattijs Korpershoek <mkorpersh...@baylibre.com>
Reviewed-by: Simon Glass <s...@chromium.org>
Signed-off-by: Marek Vasut <ma...@denx.de>
---
Cc: Angus Ainslie <an...@akkea.ca>
Cc: Dmitrii Merkurev <dimori...@google.com>
Cc: Eddie Cai <eddie.cai.li...@gmail.com>
Cc: Kever Yang <kever.y...@rock-chips.com>
Cc: Lukasz Majewski <lu...@denx.de>
Cc: Miquel Raynal <miquel.ray...@bootlin.com>
Cc: Mattijs Korpershoek <mkorpersh...@baylibre.com>
Cc: Nishanth Menon <n...@ti.com>
Cc: Patrice Chotard <patrice.chot...@foss.st.com>
Cc: Patrick Delaunay <patrick.delau...@foss.st.com>
Cc: Philipp Tomsich <philipp.toms...@vrull.eu>
Cc: Simon Glass <s...@chromium.org>
Cc: Stefan Roese <s...@denx.de>
Cc: ker...@puri.sm
---
V2: Add RB from Mattijs, Simon
---
 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