public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix UIO with device tree but no assigned interrupt
@ 2013-06-17 13:49 Pavel Machek
  2013-06-17 23:46 ` Greg KH
  2013-06-18  9:03 ` Grant Likely
  0 siblings, 2 replies; 10+ messages in thread
From: Pavel Machek @ 2013-06-17 13:49 UTC (permalink / raw)
  To: dzu, hjk, gregkh, grant.likely, rob.herring, linux-kernel; +Cc: trivial

If device is initialized from device tree, but has no interrupt assigned,
uio will still try to request and interrupt old way, fails, and fails registration.
   
This is wrong; don't try initializing irq using platform data if device tree is
available.
    
Signed-off-by: Pavel Machek <pavel@denx.de>
Reported-by: Detlev Zundel <dzu@denx.de>
Tested-by: Detlev Zundel <dzu@denx.de>

diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
index 8fcc2c7..f709ead 100644
--- a/drivers/uio/uio_pdrv_genirq.c
+++ b/drivers/uio/uio_pdrv_genirq.c
@@ -213,7 +213,8 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)
 		goto bad0;
 	}
 
-	if (!uioinfo->irq) {
+	/* interrupts from device tree are already handled above */
+	if (!pdev->dev.of_node && !uioinfo->irq) {
 		ret = platform_get_irq(pdev, 0);
 		if (ret < 0) {
 			dev_err(&pdev->dev, "failed to get IRQ\n");

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

end of thread, other threads:[~2013-06-18 20:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-17 13:49 [PATCH] fix UIO with device tree but no assigned interrupt Pavel Machek
2013-06-17 23:46 ` Greg KH
2013-06-18 12:53   ` Pavel Machek
2013-06-18  9:03 ` Grant Likely
2013-06-18 12:52   ` Pavel Machek
2013-06-18 14:08     ` Grant Likely
2013-06-18 14:24       ` Pavel Machek
2013-06-18 14:26       ` Pavel Machek
2013-06-18 17:58         ` Greg Kroah-Hartman
2013-06-18 20:37           ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox