]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
usb: host: xhci-plat: add quirks member into struct xhci_plat_priv
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Mon, 2 Sep 2019 12:01:36 +0000 (21:01 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Sep 2019 13:53:11 +0000 (15:53 +0200)
To simplify adding xhci->quirks instead of the .init_quirk()
function, this patch adds a new parameter "quirks" into
the struct xhci_plat_priv.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/1567425698-27560-2-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-plat.c
drivers/usb/host/xhci-plat.h

index a1e5ce484bf88ff1b04ee6ff08f976d3f16cc6dd..1843b698b78ac440d9a274f7910fcd999bfacca9 100644 (file)
@@ -66,12 +66,14 @@ static int xhci_priv_resume_quirk(struct usb_hcd *hcd)
 
 static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci)
 {
+       struct xhci_plat_priv *priv = xhci_to_priv(xhci);
+
        /*
         * As of now platform drivers don't provide MSI support so we ensure
         * here that the generic code does not try to make a pci_dev from our
         * dev struct in order to setup MSI
         */
-       xhci->quirks |= XHCI_PLAT;
+       xhci->quirks |= XHCI_PLAT | priv->quirks;
 }
 
 /* called during probe() after chip reset completes */
index ae29f22ff5bd7f38453b229985fea0d6db48e7b0..5681723fc9cd73b8c6bf40ef0d764df5e4fde511 100644 (file)
 
 struct xhci_plat_priv {
        const char *firmware_name;
+       unsigned long long quirks;
        void (*plat_start)(struct usb_hcd *);
        int (*init_quirk)(struct usb_hcd *);
        int (*resume_quirk)(struct usb_hcd *);
 };
 
 #define hcd_to_xhci_priv(h) ((struct xhci_plat_priv *)hcd_to_xhci(h)->priv)
+#define xhci_to_priv(x) ((struct xhci_plat_priv *)(x)->priv)
 #endif /* _XHCI_PLAT_H */