All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: host: ohci-spear: simplify calling usb_add_hcd()
@ 2021-07-12 18:16 Sergey Shtylyov
  2021-07-12 19:08 ` Alan Stern
  0 siblings, 1 reply; 2+ messages in thread
From: Sergey Shtylyov @ 2021-07-12 18:16 UTC (permalink / raw)
  To: Alan Stern, Greg Kroah-Hartman, linux-usb

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(-)

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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: host: ohci-spear: simplify calling usb_add_hcd()
  2021-07-12 18:16 [PATCH] usb: host: ohci-spear: simplify calling usb_add_hcd() Sergey Shtylyov
@ 2021-07-12 19:08 ` Alan Stern
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Stern @ 2021-07-12 19:08 UTC (permalink / raw)
  To: Sergey Shtylyov; +Cc: Greg Kroah-Hartman, linux-usb

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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-12 19:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12 18:16 [PATCH] usb: host: ohci-spear: simplify calling usb_add_hcd() Sergey Shtylyov
2021-07-12 19:08 ` Alan Stern

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.