rtc: s5m: limit endless loop waiting for register update
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Fri, 13 Dec 2013 01:12:28 +0000 (17:12 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 13 Dec 2013 02:19:26 +0000 (18:19 -0800)
commitd73238d4a6ca2eadbd14565d769706c85650c641
tree656c58a23c71db744b97e7d4b79d1924c8099cbb
parent7b003be82676ddf0bca52e0f98e0694da2ac427f
rtc: s5m: limit endless loop waiting for register update

After setting alarm or time the driver is waiting for UDR register to be
cleared indicating that registers data have been transferred.

Limit the endless loop to only 5 retries.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Mark Brown <broonie@linaro.org>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-s5m.c