]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
usb: host: xhci-plat: mvebu: use ->quirks instead of ->init_quirk() func
authorThéo Lebrun <theo.lebrun@bootlin.com>
Wed, 5 Feb 2025 17:36:46 +0000 (18:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:50:55 +0000 (07:50 +0200)
[ Upstream commit 64eb182d5f7a5ec30227bce4f6922ff663432f44 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/host/xhci-mvebu.c
drivers/usb/host/xhci-mvebu.h
drivers/usb/host/xhci-plat.c

index 87f1597a0e5ab7c823c6882e40d7a384a306b86a..257e4d79971fda18c64120fc16e7ecf5b9229201 100644 (file)
@@ -73,13 +73,3 @@ int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd)
 
        return 0;
 }
-
-int xhci_mvebu_a3700_init_quirk(struct usb_hcd *hcd)
-{
-       struct xhci_hcd *xhci = hcd_to_xhci(hcd);
-
-       /* Without reset on resume, the HC won't work at all */
-       xhci->quirks |= XHCI_RESET_ON_RESUME;
-
-       return 0;
-}
index 3be021793cc8b07fcab2529214e57599c6f20d2d..9d26e22c48422fb97a86b99ef2ff861241e6c6a2 100644 (file)
@@ -12,16 +12,10 @@ struct usb_hcd;
 
 #if IS_ENABLED(CONFIG_USB_XHCI_MVEBU)
 int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd);
-int xhci_mvebu_a3700_init_quirk(struct usb_hcd *hcd);
 #else
 static inline int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd)
 {
        return 0;
 }
-
-static inline int xhci_mvebu_a3700_init_quirk(struct usb_hcd *hcd)
-{
-       return 0;
-}
 #endif
 #endif /* __LINUX_XHCI_MVEBU_H */
index d68e9abcdc69a6add121a6c1c7ac701fbb3d8886..8832e0cedadaffcb3516d8467954b4db7b7f49d4 100644 (file)
@@ -106,7 +106,7 @@ static const struct xhci_plat_priv xhci_plat_marvell_armada = {
 };
 
 static const struct xhci_plat_priv xhci_plat_marvell_armada3700 = {
-       .init_quirk = xhci_mvebu_a3700_init_quirk,
+       .quirks = XHCI_RESET_ON_RESUME,
 };
 
 static const struct xhci_plat_priv xhci_plat_brcm = {