Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1238298
| From | Jiri Slaby <jslaby@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.12 20/84] usb: host: ehci-sys: delete useless bus_to_hcd conversion |
| Date | 2015-10-02 16:00 +0200 |
| Message-ID | <qf92t-5aj-63@gated-at.bofh.it> (permalink) |
| References | <qf8zn-4Bq-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Peter Chen <peter.chen@freescale.com>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 0521cfd06e1ebcd575e7ae36aab068b38df23850 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: Peter Chen <peter.chen@freescale.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/usb/host/ehci-sysfs.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/host/ehci-sysfs.c b/drivers/usb/host/ehci-sysfs.c
index 14ced00ba220..0659024290af 100644
--- a/drivers/usb/host/ehci-sysfs.c
+++ b/drivers/usb/host/ehci-sysfs.c
@@ -29,7 +29,7 @@ static ssize_t show_companion(struct device *dev,
int count = PAGE_SIZE;
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);
for (index = 0; index < nports; ++index) {
@@ -54,7 +54,7 @@ static ssize_t store_companion(struct device *dev,
struct ehci_hcd *ehci;
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 */
if (sscanf(buf, "%d", &portnum) != 1)
return -EINVAL;
@@ -85,7 +85,7 @@ static ssize_t show_uframe_periodic_max(struct device *dev,
struct ehci_hcd *ehci;
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);
return n;
}
@@ -102,7 +102,7 @@ static ssize_t store_uframe_periodic_max(struct device *dev,
unsigned long flags;
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)
return -EINVAL;
--
2.6.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 3.12 00/84] 3.12.49-stable review Jiri Slaby <jslaby@suse.cz> - 2015-10-02 16:00 +0200
[PATCH 3.12 01/84] PCI: Add dev_flags bit to access VPD through function 0 Jiri Slaby <jslaby@suse.cz> - 2015-10-02 16:00 +0200
[PATCH 3.12 09/84] crypto: caam - fix memory corruption in ahash_final_ctx Jiri Slaby <jslaby@suse.cz> - 2015-10-02 16:00 +0200
[PATCH 3.12 20/84] usb: host: ehci-sys: delete useless bus_to_hcd conversion Jiri Slaby <jslaby@suse.cz> - 2015-10-02 16:00 +0200
[PATCH 3.12 02/84] PCI: Add VPD function 0 quirk for Intel Ethernet devices Jiri Slaby <jslaby@suse.cz> - 2015-10-02 16:00 +0200
[PATCH 3.12 10/84] arm64: KVM: Fix host crash when injecting a fault into a 32bit guest Jiri Slaby <jslaby@suse.cz> - 2015-10-02 16:00 +0200
[PATCH 3.12 07/84] libfc: Fix fc_fcp_cleanup_each_cmd() Jiri Slaby <jslaby@suse.cz> - 2015-10-02 16:00 +0200
[PATCH 3.12 04/84] staging: comedi: usbduxsigma: don't clobber ao_timer in command test Jiri Slaby <jslaby@suse.cz> - 2015-10-02 16:00 +0200
Re: [PATCH 3.12 00/84] 3.12.49-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2015-10-02 17:40 +0200
Re: [PATCH 3.12 00/84] 3.12.49-stable review Guenter Roeck <linux@roeck-us.net> - 2015-10-02 18:10 +0200
csiph-web