linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [DRIVER CORE] platform_get_irq*(): return NO_IRQ on error
@ 2006-01-05 17:11 David Vrabel
  2006-01-05 17:26 ` Russell King
  2006-01-05 17:37 ` Greg KH
  0 siblings, 2 replies; 8+ messages in thread
From: David Vrabel @ 2006-01-05 17:11 UTC (permalink / raw)
  To: Linux Kernel; +Cc: gregkh, Russell King

[-- Attachment #1: Type: text/plain, Size: 317 bytes --]

platform_get_irq*() cannot return 0 on error as 0 is a valid IRQ on some
platforms, return NO_IRQ (-1) instead.

Signed-off-by: David Vrabel <dvrabel@arcom.com>
-- 
David Vrabel, Design Engineer

Arcom, Clifton Road           Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK         Web: http://www.arcom.com/

[-- Attachment #2: platform_get_irq-return-NO_IRQ --]
[-- Type: text/plain, Size: 622 bytes --]

Index: linux-2.6-working/drivers/base/platform.c
===================================================================
--- linux-2.6-working.orig/drivers/base/platform.c	2006-01-05 16:49:23.000000000 +0000
+++ linux-2.6-working/drivers/base/platform.c	2006-01-05 17:10:18.000000000 +0000
@@ -59,7 +59,7 @@
 {
 	struct resource *r = platform_get_resource(dev, IORESOURCE_IRQ, num);
 
-	return r ? r->start : 0;
+	return r ? r->start : NO_IRQ;
 }
 
 /**
@@ -94,7 +94,7 @@
 {
 	struct resource *r = platform_get_resource_byname(dev, IORESOURCE_IRQ, name);
 
-	return r ? r->start : 0;
+	return r ? r->start : NO_IRQ;
 }
 
 /**

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

end of thread, other threads:[~2006-01-19 17:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-05 17:11 [DRIVER CORE] platform_get_irq*(): return NO_IRQ on error David Vrabel
2006-01-05 17:26 ` Russell King
2006-01-05 17:37 ` Greg KH
2006-01-05 18:03   ` David Vrabel
2006-01-05 18:08     ` Greg KH
2006-01-19 17:49       ` [patch 0/2] driver core: platform_get_irq*(): return -ENXIO " David Vrabel
2006-01-19 17:52         ` [patch 1/2] " David Vrabel
2006-01-19 17:56         ` [patch 2/2] handle errors returned by platform_get_irq*() David Vrabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).