aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/platform.c
diff options
context:
space:
mode:
authorDavid Vrabel <dvrabel@arcom.com>2006-01-19 12:52:27 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 16:42:57 -0500
commit305b3228f9ff4d59f49e6d34a7034d44ee8ce2f0 (patch)
treef8ecf355e7433d8442f1c76f232f01e72a89b769 /drivers/base/platform.c
parent972de6c8bfd8b36618563be454df1e95a36dc379 (diff)
[PATCH] driver core: platform_get_irq*(): return -ENXIO on error
platform_get_irq*() cannot return 0 on error as 0 is a valid IRQ on some platforms, return -ENXIO instead. Signed-off-by: David Vrabel <dvrabel@arcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r--drivers/base/platform.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 461554a02517..89b268321321 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -61,7 +61,7 @@ int platform_get_irq(struct platform_device *dev, unsigned int num)
61{ 61{
62 struct resource *r = platform_get_resource(dev, IORESOURCE_IRQ, num); 62 struct resource *r = platform_get_resource(dev, IORESOURCE_IRQ, num);
63 63
64 return r ? r->start : 0; 64 return r ? r->start : -ENXIO;
65} 65}
66EXPORT_SYMBOL_GPL(platform_get_irq); 66EXPORT_SYMBOL_GPL(platform_get_irq);
67 67
@@ -98,7 +98,7 @@ int platform_get_irq_byname(struct platform_device *dev, char *name)
98{ 98{
99 struct resource *r = platform_get_resource_byname(dev, IORESOURCE_IRQ, name); 99 struct resource *r = platform_get_resource_byname(dev, IORESOURCE_IRQ, name);
100 100
101 return r ? r->start : 0; 101 return r ? r->start : -ENXIO;
102} 102}
103EXPORT_SYMBOL_GPL(platform_get_irq_byname); 103EXPORT_SYMBOL_GPL(platform_get_irq_byname);
104 104