rtc: bunch of drivers: fix 'no irq' case handing
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Tue, 6 Jan 2009 22:42:11 +0000 (14:42 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 6 Jan 2009 23:59:23 +0000 (15:59 -0800)
commit2fac6674ddf3164da42a76d62f8912073d629a30
treeffc7b69bbbe065ebe1e75be601c866467252f550
parentd4afc76c0b59a37113e184004f8a9989cfc1ddd3
rtc: bunch of drivers: fix 'no irq' case handing

This patch fixes a bunch of irq checking misuses.  Most drivers were
getting irq via platform_get_irq(), which returns -ENXIO or r->start.

rtc-cmos.c is special.  It is using PNP and platform bindings.  Hopefully
nobody is using PNP IRQ 0 for RTC.  So the changes should be safe.

rtc-sh.c is using platform_get_irq, but was storing a result into an
unsigned type, then was checking for < 0.  This is fixed now.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-at32ap700x.c
drivers/rtc/rtc-cmos.c
drivers/rtc/rtc-ds1511.c
drivers/rtc/rtc-ds1553.c
drivers/rtc/rtc-m48t59.c
drivers/rtc/rtc-sh.c
drivers/rtc/rtc-stk17ta8.c
drivers/rtc/rtc-twl4030.c
drivers/rtc/rtc-vr41xx.c