diff options
author | David Vrabel <dvrabel@arcom.com> | 2006-01-19 17:52:27 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-20 13:42:57 -0800 |
commit | 305b3228f9ff4d59f49e6d34a7034d44ee8ce2f0 (patch) | |
tree | f8ecf355e7433d8442f1c76f232f01e72a89b769 /drivers/base | |
parent | 972de6c8bfd8b36618563be454df1e95a36dc379 (diff) | |
download | blackbird-op-linux-305b3228f9ff4d59f49e6d34a7034d44ee8ce2f0.tar.gz blackbird-op-linux-305b3228f9ff4d59f49e6d34a7034d44ee8ce2f0.zip |
[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')
-rw-r--r-- | drivers/base/platform.c | 4 |
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) { struct resource *r = platform_get_resource(dev, IORESOURCE_IRQ, num); - return r ? r->start : 0; + return r ? r->start : -ENXIO; } EXPORT_SYMBOL_GPL(platform_get_irq); @@ -98,7 +98,7 @@ int platform_get_irq_byname(struct platform_device *dev, char *name) { struct resource *r = platform_get_resource_byname(dev, IORESOURCE_IRQ, name); - return r ? r->start : 0; + return r ? r->start : -ENXIO; } EXPORT_SYMBOL_GPL(platform_get_irq_byname); |