diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-06-17 22:13:57 +0200 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2009-08-26 23:14:49 +0200 |
commit | dd9b3e84f2095ed19582f4df5d20e1e40c01ca3c (patch) | |
tree | 5c93c30c5c7abc4aecd70cfc2c2bfa61a2b76148 /arch/m68k/amiga/config.c | |
parent | m68k: count can reach 51, not 50 (diff) | |
download | linux-dd9b3e84f2095ed19582f4df5d20e1e40c01ca3c.tar.xz linux-dd9b3e84f2095ed19582f4df5d20e1e40c01ca3c.zip |
m68k: cnt reaches -1, not 0
With the postfix decrement cnt reaches -1 rather than 0.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/amiga/config.c')
-rw-r--r-- | arch/m68k/amiga/config.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c index 6e562751ad51..6c74751c7b82 100644 --- a/arch/m68k/amiga/config.c +++ b/arch/m68k/amiga/config.c @@ -574,10 +574,11 @@ static int a2000_hwclk(int op, struct rtc_time *t) tod_2000.cntrl1 = TOD2000_CNTRL1_HOLD; - while ((tod_2000.cntrl1 & TOD2000_CNTRL1_BUSY) && cnt--) { + while ((tod_2000.cntrl1 & TOD2000_CNTRL1_BUSY) && cnt) { tod_2000.cntrl1 &= ~TOD2000_CNTRL1_HOLD; udelay(70); tod_2000.cntrl1 |= TOD2000_CNTRL1_HOLD; + --cnt; } if (!cnt) @@ -649,10 +650,11 @@ static int amiga_set_clock_mmss(unsigned long nowtime) tod_2000.cntrl1 |= TOD2000_CNTRL1_HOLD; - while ((tod_2000.cntrl1 & TOD2000_CNTRL1_BUSY) && cnt--) { + while ((tod_2000.cntrl1 & TOD2000_CNTRL1_BUSY) && cnt) { tod_2000.cntrl1 &= ~TOD2000_CNTRL1_HOLD; udelay(70); tod_2000.cntrl1 |= TOD2000_CNTRL1_HOLD; + --cnt; } if (!cnt) |