mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 11:16:11 +00:00
[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>
This commit is contained in:
parent
972de6c8bf
commit
305b3228f9
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue