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

From: Russell King
Date: Fri Oct 22 2004 - 07:50:29 EST


On Fri, Oct 22, 2004 at 11:10:18AM +0100, Ben Dooks wrote:
> 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.

A better solution would be to make it return NO_IRQ. There's been some
discussions recently about having this implemented across all platforms,
and that's what stopped me submitting the version which used this macro
back when this was merged. (the fact that NO_IRQ is not defined by
everyone)

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
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/