Commit 416b9ba1 authored by Peter Chen's avatar Peter Chen Committed by Luis Henriques

usb: host: ehci-sys: delete useless bus_to_hcd conversion

commit 0521cfd0 upstream.

The ehci platform device's drvdata is the pointer of struct usb_hcd
already, so we doesn't need to call bus_to_hcd conversion again.
Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 6a64d8c4
...@@ -29,7 +29,7 @@ static ssize_t show_companion(struct device *dev, ...@@ -29,7 +29,7 @@ static ssize_t show_companion(struct device *dev,
int count = PAGE_SIZE; int count = PAGE_SIZE;
char *ptr = buf; char *ptr = buf;
ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev))); ehci = hcd_to_ehci(dev_get_drvdata(dev));
nports = HCS_N_PORTS(ehci->hcs_params); nports = HCS_N_PORTS(ehci->hcs_params);
for (index = 0; index < nports; ++index) { for (index = 0; index < nports; ++index) {
...@@ -54,7 +54,7 @@ static ssize_t store_companion(struct device *dev, ...@@ -54,7 +54,7 @@ static ssize_t store_companion(struct device *dev,
struct ehci_hcd *ehci; struct ehci_hcd *ehci;
int portnum, new_owner; int portnum, new_owner;
ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev))); ehci = hcd_to_ehci(dev_get_drvdata(dev));
new_owner = PORT_OWNER; /* Owned by companion */ new_owner = PORT_OWNER; /* Owned by companion */
if (sscanf(buf, "%d", &portnum) != 1) if (sscanf(buf, "%d", &portnum) != 1)
return -EINVAL; return -EINVAL;
...@@ -85,7 +85,7 @@ static ssize_t show_uframe_periodic_max(struct device *dev, ...@@ -85,7 +85,7 @@ static ssize_t show_uframe_periodic_max(struct device *dev,
struct ehci_hcd *ehci; struct ehci_hcd *ehci;
int n; int n;
ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev))); ehci = hcd_to_ehci(dev_get_drvdata(dev));
n = scnprintf(buf, PAGE_SIZE, "%d\n", ehci->uframe_periodic_max); n = scnprintf(buf, PAGE_SIZE, "%d\n", ehci->uframe_periodic_max);
return n; return n;
} }
...@@ -101,7 +101,7 @@ static ssize_t store_uframe_periodic_max(struct device *dev, ...@@ -101,7 +101,7 @@ static ssize_t store_uframe_periodic_max(struct device *dev,
unsigned long flags; unsigned long flags;
ssize_t ret; ssize_t ret;
ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev))); ehci = hcd_to_ehci(dev_get_drvdata(dev));
if (kstrtouint(buf, 0, &uframe_periodic_max) < 0) if (kstrtouint(buf, 0, &uframe_periodic_max) < 0)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment