diff options
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 9 | ||||
-rw-r--r-- | drivers/usb/host/ehci-pci.c | 5 | ||||
-rw-r--r-- | drivers/usb/host/ehci-platform.c | 3 | ||||
-rw-r--r-- | drivers/usb/host/ehci.h | 1 |
4 files changed, 8 insertions, 10 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 28f694eb624b..c97503bb0b0e 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -1231,10 +1231,11 @@ void ehci_init_driver(struct hc_driver *drv, /* Copy the generic table to drv and then apply the overrides */ *drv = ehci_hc_driver; - drv->product_desc = over->product_desc; - drv->hcd_priv_size += over->extra_priv_size; - if (over->reset) - drv->reset = over->reset; + if (over) { + drv->hcd_priv_size += over->extra_priv_size; + if (over->reset) + drv->reset = over->reset; + } } EXPORT_SYMBOL_GPL(ehci_init_driver); diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index 46018e975244..3fb76ca61848 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c @@ -383,8 +383,7 @@ static int ehci_pci_resume(struct usb_hcd *hcd, bool hibernated) static struct hc_driver __read_mostly ehci_pci_hc_driver; -static const struct ehci_driver_overrides overrides = { - .product_desc = "EHCI PCI host controller", +static const struct ehci_driver_overrides pci_overrides __initdata = { .reset = ehci_pci_setup, }; @@ -426,7 +425,7 @@ static int __init ehci_pci_init(void) pr_info("%s: " DRIVER_DESC "\n", hcd_name); - ehci_init_driver(&ehci_pci_hc_driver, &overrides); + ehci_init_driver(&ehci_pci_hc_driver, &pci_overrides); /* Entries for the PCI suspend/resume callbacks are special */ ehci_pci_hc_driver.pci_suspend = ehci_suspend; diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c index feeedf840117..f14c542b142f 100644 --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c @@ -57,8 +57,7 @@ static int ehci_platform_reset(struct usb_hcd *hcd) static struct hc_driver __read_mostly ehci_platform_hc_driver; -static const struct ehci_driver_overrides platform_overrides = { - .product_desc = "Generic Platform EHCI controller", +static const struct ehci_driver_overrides platform_overrides __initdata = { .reset = ehci_platform_reset, }; diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index 24a8ada4701c..9dadc7118d68 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -784,7 +784,6 @@ static inline u32 hc32_to_cpup (const struct ehci_hcd *ehci, const __hc32 *x) /* Declarations of things exported for use by ehci platform drivers */ struct ehci_driver_overrides { - const char *product_desc; size_t extra_priv_size; int (*reset)(struct usb_hcd *hcd); }; |