Skip to content

Commit 1b052ee

Browse files
committed
usb: dwc2: Fix build in periphal-only mode
The bus_suspended member of struct dwc2_hsotg is only present in builds that support host-mode. See: #4368 Fixes: 62bb46f ("usb: dwc2: Fix hibernation between host and device modes.") Signed-off-by: Phil Elwell <[email protected]>
1 parent 8b85410 commit 1b052ee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/usb/dwc2/core_intr.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,11 @@ static inline void dwc_handle_gpwrdn_disc_det(struct dwc2_hsotg *hsotg,
707707
dwc2_writel(hsotg, gpwrdn_tmp, GPWRDN);
708708

709709
hsotg->hibernated = 0;
710+
711+
#if IS_ENABLED(CONFIG_USB_DWC2_HOST) || \
712+
IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE)
710713
hsotg->bus_suspended = 0;
714+
#endif
711715

712716
if (gpwrdn & GPWRDN_IDSTS) {
713717
hsotg->op_state = OTG_STATE_B_PERIPHERAL;

0 commit comments

Comments
 (0)