All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: <linux-usb@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Bin Liu <b-liu@ti.com>
Subject: [PATCH v2 10/10] usb: musb: core: fix deferred probing
Date: Wed, 8 Dec 2021 22:21:18 +0300	[thread overview]
Message-ID: <20211208192118.7483-11-s.shtylyov@omp.ru> (raw)
In-Reply-To: <20211208192118.7483-1-s.shtylyov@omp.ru>

The driver overrides the error codes returned by platform_get_irq() to
-ENODEV, so if it returns -EPROBE_DEFER, the driver will fail the probe
permanently instead of the deferred probing. Switch to propagating the
error codes upstream. IRQ0 is no longer returned by platform_get_irq(),
so we now can safely ignore it...

Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
Changes in version 2:
- updated the patch description on treating IRQ0.

 drivers/usb/musb/musb_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index f7b1d5993f8c..e57abc54d12b 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2618,8 +2618,8 @@ static int musb_probe(struct platform_device *pdev)
 	int		irq = platform_get_irq_byname(pdev, "mc");
 	void __iomem	*base;
 
-	if (irq <= 0)
-		return -ENODEV;
+	if (irq < 0)
+		return irq;
 
 	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))
-- 
2.26.3


  parent reply	other threads:[~2021-12-08 19:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08 19:21 [PATCH v2 00/10] Fix deferred probing in the USB host/gadget drivers Sergey Shtylyov
2021-12-08 19:21 ` [PATCH v2 01/10] usb: gadget: udc: bcm63xx: fix deferred probing Sergey Shtylyov
2021-12-08 19:21   ` Sergey Shtylyov
2021-12-08 19:21 ` [PATCH v2 02/10] usb: gadget: udc: gr: " Sergey Shtylyov
2021-12-08 19:21 ` [PATCH v2 03/10] usb: gadget: udc: pxa25x: " Sergey Shtylyov
2021-12-08 19:21   ` Sergey Shtylyov
2021-12-08 19:21 ` [PATCH v2 04/10] usb: host: ehci-atmel: " Sergey Shtylyov
2021-12-08 19:21   ` Sergey Shtylyov
2021-12-08 19:21 ` [PATCH v2 05/10] usb: host: ehci-orion: " Sergey Shtylyov
2021-12-08 19:21 ` [PATCH v2 06/10] usb: host: ehci-sh: " Sergey Shtylyov
2021-12-08 19:21 ` [PATCH v2 07/10] usb: host: ohci-da8xx: " Sergey Shtylyov
2021-12-08 19:21 ` [PATCH v2 08/10] usb: host: ohci-nxp: " Sergey Shtylyov
2021-12-08 19:21 ` [PATCH v2 09/10] usb: host: ohci-omap: " Sergey Shtylyov
2021-12-08 19:53   ` Aaro Koskinen
2021-12-08 19:59     ` Sergey Shtylyov
2021-12-08 19:21 ` Sergey Shtylyov [this message]
2021-12-09  9:23 ` [PATCH v2 00/10] Fix deferred probing in the USB host/gadget drivers Sergey Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211208192118.7483-11-s.shtylyov@omp.ru \
    --to=s.shtylyov@omp.ru \
    --cc=b-liu@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.