Skip to content

Commit

Permalink
usb: xhci: Avoid use xhci_plat_phytium_pe220x when OF disabled
Browse files Browse the repository at this point in the history
xhci_plat_phytium_pe220x is only defined when OF is enabled.
This would cause a compile error:

drivers/usb/host/xhci-plat.c:532:33: error: ‘xhci_plat_phytium_pe220x’ undeclared here (not in a function); did you mean ‘xhci_plat_runtime_resume’?
  { "PHYT0039", (kernel_ulong_t)&xhci_plat_phytium_pe220x },
                                 ^~~~~~~~~~~~~~~~~~~~~~~~
                                 xhci_plat_runtime_resume
  CC [M]  drivers/usb/dwc3/core.o

It should be moved.

Signed-off-by: guanwentao <[email protected]>
Signed-off-by: WangYuli <[email protected]>
Change-Id: I4a410e99fbfca62dabf0cc493118a32d3a54c558
  • Loading branch information
Avenger-285714 committed May 16, 2024
1 parent ecf00ab commit 041de35
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/usb/host/xhci-plat.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ static int xhci_plat_start(struct usb_hcd *hcd)
return xhci_run(hcd);
}

static const struct xhci_plat_priv xhci_plat_phytium_pe220x = {
.quirks = XHCI_RESET_ON_RESUME,
};

#ifdef CONFIG_OF
static const struct xhci_plat_priv xhci_plat_marvell_armada = {
.init_quirk = xhci_mvebu_mbus_init_quirk,
Expand All @@ -113,10 +117,6 @@ static const struct xhci_plat_priv xhci_plat_brcm = {
.quirks = XHCI_RESET_ON_RESUME | XHCI_SUSPEND_RESUME_CLKS,
};

static const struct xhci_plat_priv xhci_plat_phytium_pe220x = {
.quirks = XHCI_RESET_ON_RESUME,
};

static const struct of_device_id usb_xhci_of_match[] = {
{
.compatible = "generic-xhci",
Expand Down

0 comments on commit 041de35

Please sign in to comment.