From 7338287d580fba4f09d052960941c23039e8919d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 25 Mar 2015 12:22:18 -0600 Subject: dm: usb: Pass EHCI controller pointer to ehci_get_port_speed() Adjust this function so that it is passed an EHCI controller pointer so that implementations can look up their controller. Signed-off-by: Simon Glass Reviewed-by: Marek Vasut --- drivers/usb/host/ehci-faraday.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/usb/host/ehci-faraday.c') diff --git a/drivers/usb/host/ehci-faraday.c b/drivers/usb/host/ehci-faraday.c index 3b761bc326..e38681342c 100644 --- a/drivers/usb/host/ehci-faraday.c +++ b/drivers/usb/host/ehci-faraday.c @@ -101,11 +101,12 @@ void ehci_set_usbmode(int index) * This ehci_get_port_speed() overrides the weak function * in "ehci-hcd.c". */ -int ehci_get_port_speed(struct ehci_hcor *hcor, uint32_t reg) +int ehci_get_port_speed(struct ehci_ctrl *ctrl, uint32_t reg) { int spd, ret = PORTSC_PSPD_HS; - union ehci_faraday_regs *regs = (void __iomem *)((ulong)hcor - 0x10); + union ehci_faraday_regs *regs; + ret = (void __iomem *)((ulong)ctrl->hcor - 0x10); if (ehci_is_fotg2xx(regs)) spd = OTGCSR_SPD(readl(®s->otg.otgcsr)); else -- cgit v1.2.1