Skip to content

Commit 64eb182

Browse files
tlebgregkh
authored andcommitted
usb: host: xhci-plat: mvebu: use ->quirks instead of ->init_quirk() func
Compatible "marvell,armada3700-xhci" match data uses the struct xhci_plat_priv::init_quirk() function pointer to add XHCI_RESET_ON_RESUME as quirk on XHCI. Instead, use the struct xhci_plat_priv::quirks field. Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> Link: https://lore.kernel.org/r/20250205-s2r-cdns-v7-1-13658a271c3c@bootlin.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 042c3dd commit 64eb182

File tree

3 files changed

+1
-17
lines changed

3 files changed

+1
-17
lines changed

drivers/usb/host/xhci-mvebu.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,3 @@ int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd)
7373

7474
return 0;
7575
}
76-
77-
int xhci_mvebu_a3700_init_quirk(struct usb_hcd *hcd)
78-
{
79-
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
80-
81-
/* Without reset on resume, the HC won't work at all */
82-
xhci->quirks |= XHCI_RESET_ON_RESUME;
83-
84-
return 0;
85-
}

drivers/usb/host/xhci-mvebu.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,10 @@ struct usb_hcd;
1212

1313
#if IS_ENABLED(CONFIG_USB_XHCI_MVEBU)
1414
int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd);
15-
int xhci_mvebu_a3700_init_quirk(struct usb_hcd *hcd);
1615
#else
1716
static inline int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd)
1817
{
1918
return 0;
2019
}
21-
22-
static inline int xhci_mvebu_a3700_init_quirk(struct usb_hcd *hcd)
23-
{
24-
return 0;
25-
}
2620
#endif
2721
#endif /* __LINUX_XHCI_MVEBU_H */

drivers/usb/host/xhci-plat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static const struct xhci_plat_priv xhci_plat_marvell_armada = {
106106
};
107107

108108
static const struct xhci_plat_priv xhci_plat_marvell_armada3700 = {
109-
.init_quirk = xhci_mvebu_a3700_init_quirk,
109+
.quirks = XHCI_RESET_ON_RESUME,
110110
};
111111

112112
static const struct xhci_plat_priv xhci_plat_brcm = {

0 commit comments

Comments
 (0)