m68k/mac: Fix compiler warning in via_read_time()
authorFinn Thain <fthain@telegraphics.com.au>
Sun, 17 Jul 2011 14:06:10 +0000 (00:06 +1000)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 24 Oct 2011 19:00:34 +0000 (21:00 +0200)
commit75a23850cd282eeafbe23d6a9ade4eaf23babd51
treeba6582c7c0c5c54dd5b986b324354b743a2a8299
parentd996e9dc453a5f327961f19d274c6481b3bf4f34
m68k/mac: Fix compiler warning in via_read_time()

The algorithm described in the comment compares two reads from the RTC but
the code actually reads once and compares the result to an uninitialized
value. This causes the compiler to warn, "last_result maybe used
uninitialized". Make the code match the comment, fix the warning and
perhaps improve reliability. Tested on a Quadra 700.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
arch/m68k/mac/misc.c