OMAP clock/hwmod: fix off-by-one errors
authorPaul Walmsley <paul@pwsan.com>
Tue, 8 Dec 2009 23:33:16 +0000 (16:33 -0700)
committerpaul <paul@twilight.(none)>
Sat, 12 Dec 2009 00:00:43 +0000 (17:00 -0700)
commit6f8b7ff5b01e16a65c3b17865ce047faeca40907
treeae5ecb4b377588b157c23176cf95a5c9631206ba
parent3863c74b512c1afd3ce6b2f81d8dea9f1d860968
OMAP clock/hwmod: fix off-by-one errors

Fix loop bailout off-by-one bugs reported by Juha Leppänen
<juha_motorsportcom@luukku.com>.

This second version incorporates comments from Russell King
<linux@arm.linux.org.uk>.  A new macro, 'omap_test_timeout', has
been created, with cleaner code, and existing code has been converted
to use it.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Juha Leppänen <juha_motorsportcom@luukku.com>
Cc: Russell King <linux@arm.linux.org.uk>
arch/arm/mach-omap2/cm.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/prcm.c
arch/arm/plat-omap/include/plat/common.h