Re: [PATCH] rtc: bunch of drivers: fix 'no irq' case handing

David Brownell
2008-11-10T22:49:31Z

On Thursday 06 November 2008, Anton Vorontsov wrote:
> This patch fixes bunch of irq checking misuses.  Most drivers were getting
> irq via platform_get_irq(), which returns -ENXIO or r->start.  Platforms
> may specify r->start = 0 to emphasize 'no irq' case, and drivers should
> handle this correctly.

Just strike that "Platforms may specify..." sentence. It's incorrect.
The normal way to specify "no IRQ" is, surprise!, to not specify one.

The rule about IRQ=0 is that it's not for generic driver use... and I
happen to know a family of platforms where it's used for the RTC and
a few other core system drivers. (Your patch doesn't touch them.)

> ...
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>

Acked-by: David Brownell <dbrownell@users.sourceforge.net>