usb: host: ohci-spear: simplify calling usb_add_hcd()

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...

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Link: https://lore.kernel.org/r/3e4ad969-f2ae-32f7-53fd-ea369f140703@omp.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Sergey Shtylyov 2021-07-12 21:16:07 +03:00 committed by Greg Kroah-Hartman
parent 73cb091289
commit e725ace06f

View File

@ -84,7 +84,7 @@ static int spear_ohci_hcd_drv_probe(struct platform_device *pdev)
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;