summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarek Vasut <[email protected]>2024-08-18 22:04:15 +0200
committerMattijs Korpershoek <[email protected]>2024-08-22 09:23:33 +0200
commite49eeb6575152cac4241f3c87471934a726970e9 (patch)
treeb34a9f7495c4d4614a2ce148ce331f667750989b /drivers
parent6509c3fe1c7dddf1d598a9fd8234ed760b3a428b (diff)
usb: gadget: ux500: Do not redefine ops if CONFIG_USB_MUSB_HOST set
In case CONFIG_USB_MUSB_HOST is set, the ux500_gadget_ops get overridden to musb_usb_ops . Simply set the ops one way or the other depending on whether CONFIG_USB_MUSB_HOST is set or not. Fixes: ac4bf5d48a9e ("usb: gadget: ux500: Convert interrupt handling to usb_gadget_generic_ops") Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/musb-new/ux500.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/musb-new/ux500.c b/drivers/usb/musb-new/ux500.c
index 89dd75b7d05..be0085f403d 100644
--- a/drivers/usb/musb-new/ux500.c
+++ b/drivers/usb/musb-new/ux500.c
@@ -169,16 +169,14 @@ U_BOOT_DRIVER(ux500_musb) = {
.name = "ux500-musb",
#ifdef CONFIG_USB_MUSB_HOST
.id = UCLASS_USB,
+ .ops = &musb_usb_ops,
#else
.id = UCLASS_USB_GADGET_GENERIC,
+ .ops = &ux500_gadget_ops,
#endif
.of_match = ux500_musb_ids,
- .ops = &ux500_gadget_ops,
.probe = ux500_musb_probe,
.remove = ux500_musb_remove,
-#ifdef CONFIG_USB_MUSB_HOST
- .ops = &musb_usb_ops,
-#endif
.plat_auto = sizeof(struct usb_plat),
.priv_auto = sizeof(struct ux500_glue),
};