diff --git a/drivers/usb/dwc3/dwc3-msm.c b/drivers/usb/dwc3/dwc3-msm.c index b4e705b3eb36..d6c2d9c90d9f 100644 --- a/drivers/usb/dwc3/dwc3-msm.c +++ b/drivers/usb/dwc3/dwc3-msm.c @@ -4829,7 +4829,9 @@ static int dwc3_otg_start_host(struct dwc3_msm *mdwc, int on) mdwc->host_nb.notifier_call = dwc3_msm_host_notifier; +#ifdef USB_CONFIG usb_register_notify(&mdwc->host_nb); +#endif dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_HOST); if (!dwc->dis_enblslpm_quirk) @@ -4908,7 +4910,9 @@ static int dwc3_otg_start_host(struct dwc3_msm *mdwc, int on) mdwc->hs_phy->flags &= ~PHY_HOST_MODE; dwc3_host_exit(dwc); +#ifdef USB_CONFIG usb_unregister_notify(&mdwc->host_nb); +#endif dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_DEVICE); dwc3_msm_write_reg_field(mdwc->base, DWC3_GUSB3PIPECTL(0), diff --git a/include/linux/usb/xhci-sec.h b/include/linux/usb/xhci-sec.h index 5f4c3b1962db..0014aee85281 100644 --- a/include/linux/usb/xhci-sec.h +++ b/include/linux/usb/xhci-sec.h @@ -2,7 +2,7 @@ /* * xHCI secondary ring APIs * - * Copyright (c) 2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2019,2021 The Linux Foundation. All rights reserved. */ #ifndef __LINUX_XHCI_SEC_H @@ -20,7 +20,7 @@ phys_addr_t xhci_get_xfer_ring_phys_addr(struct usb_device *udev, int xhci_stop_endpoint(struct usb_device *udev, struct usb_host_endpoint *ep); #else static inline int xhci_sec_event_ring_setup(struct usb_device *udev, - unsigned int intr_num); + unsigned int intr_num) { return -ENODEV; } @@ -35,13 +35,13 @@ static inline phys_addr_t xhci_get_sec_event_ring_phys_addr( struct usb_device *udev, unsigned int intr_num, dma_addr_t *dma) { - return NULL; + return 0; } static inline phys_addr_t xhci_get_xfer_ring_phys_addr(struct usb_device *udev, struct usb_host_endpoint *ep, dma_addr_t *dma) { - return NULL; + return 0; } static inline int xhci_stop_endpoint(struct usb_device *udev,