]> git.baikalelectronics.ru Git - kernel.git/commit
[ARM] rtc-pcf8583: don't use BCD_TO_BIN/BIN_TO_BCD
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Sun, 4 Mar 2007 20:12:07 +0000 (20:12 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 4 Mar 2007 20:12:07 +0000 (20:12 +0000)
commita5534a8858de4c9305a0ef163b65ed1da4598c4d
tree7b4e206c499af24d2dad42172a52a2d215b29c76
parent5e4dea6b329706489cb639fce4662af8b104ece4
[ARM] rtc-pcf8583: don't use BCD_TO_BIN/BIN_TO_BCD

Both BCD_TO_BIN(x) and BIN_TO_BCD(x) have an unexpected side-effect -
not only do they return the value as expected, they _modify_ their
argument in the process.

Let's play it safe and avoid these macros.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/rtc/rtc-pcf8583.c