Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338652
b: refs/heads/master
c: 1b36810
h: refs/heads/master
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Nov 12, 2012
1 parent 5e47d50 commit 8c85132
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 36caff5d795429c572443894e8789c2150dd796b
refs/heads/master: 1b36810e27a9791878e4694357ab6d4c06acc22d
7 changes: 1 addition & 6 deletions trunk/drivers/usb/chipidea/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,12 @@
#include <linux/usb/hcd.h>
#include <linux/usb/chipidea.h>

#define CHIPIDEA_EHCI
#include "../host/ehci.h"

#include "ci.h"
#include "bits.h"
#include "host.h"

static const struct ehci_driver_overrides ci_overrides = {
.product_desc = "ChipIdea HDRC EHCI host controller",
};

static struct hc_driver __read_mostly ci_ehci_hc_driver;

static irqreturn_t host_irq(struct ci13xxx *ci)
Expand Down Expand Up @@ -103,7 +98,7 @@ int ci_hdrc_host_init(struct ci13xxx *ci)
rdrv->name = "host";
ci->roles[CI_ROLE_HOST] = rdrv;

ehci_init_driver(&ci_ehci_hc_driver, &ci_overrides);
ehci_init_driver(&ci_ehci_hc_driver, NULL);

return 0;
}
9 changes: 5 additions & 4 deletions trunk/drivers/usb/host/ehci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/usb/host/ehci-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/usb/host/ehci-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/usb/host/ehci.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down

0 comments on commit 8c85132

Please sign in to comment.