Re: [PATCH/RFC] platform_get_irq() return for no IRQ

From: Ben Dooks
Date: Fri Oct 22 2004 - 05:13:14 EST


On Wed, Oct 20, 2004 at 06:40:15PM +0100, Ben Dooks wrote:
> in drivers/base/platform.c, platform_get_irq() returns 0 if
> there is no IRQ found in the resources, however 0 is a valid
> IRQ on at least some of the ARM architectures.
>
> This patch changes the return code to be -ENOENT instead.
>
> Signed-of-by: Ben Dooks <ben-linux@xxxxxxxxx>
>

I should have also pointed out that as few things are
actually using this at the moment, it would be a good
idea to get this changed as soon as possible.

> --- linux-2.6.9-bk4-orig/drivers/base/platform.c 2004-10-20 15:50:29.000000000 +0100
> +++ linux-2.6.9-bk4/drivers/base/platform.c 2004-10-20 18:37:12.000000000 +0100
> @@ -54,7 +54,7 @@
> {
> struct resource *r = platform_get_resource(dev, IORESOURCE_IRQ, num);
>
> - return r ? r->start : 0;
> + return r ? r->start : -ENOENT;
> }
>
> /**


--
Ben (ben@xxxxxxxxx, http://www.fluff.org/)

'a smiley only costs 4 bytes'
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/