]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/rtc/rtc-stmp3xxx.c: provide timeout for potentially endless loop polling...
authorLothar Waßmann <LW@KARO-electronics.de>
Tue, 13 Aug 2013 23:00:56 +0000 (16:00 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 14 Aug 2013 00:57:48 +0000 (17:57 -0700)
commit8f310e36993e54b676ddca84b04918a3b9a114c6
tree64cf598f048c5db0c9cfc9d6c453946fee19cd0b
parent1a96ec20ac00110a01efd0918a5c767701e4f55d
drivers/rtc/rtc-stmp3xxx.c: provide timeout for potentially endless loop polling a HW bit

It's always a bad idea to poll on HW bits without a timeout.

The i.MX28 RTC can be easily brought into a state in which the RTC is
not running (until after a power-on-reset) and thus the status bits
which are polled in the driver won't ever change.

This patch prevents the kernel from getting stuck in this case.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-stmp3xxx.c