Message ID | 3e4ad969-f2ae-32f7-53fd-ea369f140703@omp.ru (mailing list archive) |
---|---|
State | Accepted |
Commit | e725ace06fc4072a5a9e934805fbe42454b32c90 |
Headers | show |
Series | usb: host: ohci-spear: simplify calling usb_add_hcd() | expand |
On Mon, Jul 12, 2021 at 09:16:07PM +0300, Sergey Shtylyov wrote: > There is no need to call platform_get_irq() when the driver's probe() > method calls usb_add_hcd() -- the platform_get_irq()'s result will have > been stored already in the 'irq' local variable... > > Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> > > --- > The patch is against the 'usb-next' branch of Greg KH's 'usb.git' repo... Acked-by: Alan Stern <stern@rowland.harvard.edu> > drivers/usb/host/ohci-spear.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: usb/drivers/usb/host/ohci-spear.c > =================================================================== > --- usb.orig/drivers/usb/host/ohci-spear.c > +++ usb/drivers/usb/host/ohci-spear.c > @@ -84,7 +84,7 @@ static int spear_ohci_hcd_drv_probe(stru > > clk_prepare_enable(sohci_p->clk); > > - retval = usb_add_hcd(hcd, platform_get_irq(pdev, 0), 0); > + retval = usb_add_hcd(hcd, irq, 0); > if (retval == 0) { > device_wakeup_enable(hcd->self.controller); > return retval;
Index: usb/drivers/usb/host/ohci-spear.c =================================================================== --- usb.orig/drivers/usb/host/ohci-spear.c +++ usb/drivers/usb/host/ohci-spear.c @@ -84,7 +84,7 @@ static int spear_ohci_hcd_drv_probe(stru clk_prepare_enable(sohci_p->clk); - retval = usb_add_hcd(hcd, platform_get_irq(pdev, 0), 0); + retval = usb_add_hcd(hcd, irq, 0); if (retval == 0) { device_wakeup_enable(hcd->self.controller); return retval;
There is no need to call platform_get_irq() when the driver's probe() method calls usb_add_hcd() -- the platform_get_irq()'s result will have been stored already in the 'irq' local variable... Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> --- The patch is against the 'usb-next' branch of Greg KH's 'usb.git' repo... drivers/usb/host/ohci-spear.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)