[PATCH] xhci: Only build xhci_reset_hw() if CONFIG_DM_USB is enabled

Nicolas Saenz Julienne nsaenzjulienne at suse.de
Thu Jul 9 19:31:32 CEST 2020


This was breaking build on some configurations.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne at suse.de>
---

Matthias, I don't know if it's possible at this stage, but I'd ideally squash
this into the offending patch.

 drivers/usb/host/xhci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index e252964d0d..f635bb39f6 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -190,6 +190,7 @@ static int xhci_start(struct xhci_hcor *hcor)
 	return ret;
 }
 
+#if CONFIG_IS_ENABLED(DM_USB)
 /**
  * Resets XHCI Hardware
  *
@@ -218,6 +219,7 @@ static int xhci_reset_hw(struct xhci_ctrl *ctrl)
 
 	return 0;
 }
+#endif
 
 /**
  * Resets the XHCI Controller
-- 
2.27.0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200709/d1c4b894/attachment.sig>


More information about the U-Boot mailing list