Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

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.

Cc: <stable@vger.kernel.org>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Peter Chen and committed by
Greg Kroah-Hartman
0521cfd0 475908bc

+4 -4
+4 -4
drivers/usb/host/ehci-sysfs.c
··· 29 29 int count = PAGE_SIZE; 30 30 char *ptr = buf; 31 31 32 - ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev))); 32 + ehci = hcd_to_ehci(dev_get_drvdata(dev)); 33 33 nports = HCS_N_PORTS(ehci->hcs_params); 34 34 35 35 for (index = 0; index < nports; ++index) { ··· 54 54 struct ehci_hcd *ehci; 55 55 int portnum, new_owner; 56 56 57 - ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev))); 57 + ehci = hcd_to_ehci(dev_get_drvdata(dev)); 58 58 new_owner = PORT_OWNER; /* Owned by companion */ 59 59 if (sscanf(buf, "%d", &portnum) != 1) 60 60 return -EINVAL; ··· 85 85 struct ehci_hcd *ehci; 86 86 int n; 87 87 88 - ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev))); 88 + ehci = hcd_to_ehci(dev_get_drvdata(dev)); 89 89 n = scnprintf(buf, PAGE_SIZE, "%d\n", ehci->uframe_periodic_max); 90 90 return n; 91 91 } ··· 101 101 unsigned long flags; 102 102 ssize_t ret; 103 103 104 - ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev))); 104 + ehci = hcd_to_ehci(dev_get_drvdata(dev)); 105 105 if (kstrtouint(buf, 0, &uframe_periodic_max) < 0) 106 106 return -EINVAL; 107 107