diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-06-19 15:17:53 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-06-19 16:20:31 +0200 |
commit | fedc459a3da35ecf171a1d6dd9f7f51fb452baf8 (patch) | |
tree | 26539ab12466d3a74b10e7a2704d205a26f47035 /drivers/rtc/rtc-pxa.c | |
parent | e32e60a2d5ecd8affc79f7da02d3479b4116579f (diff) | |
download | linux-fedc459a3da35ecf171a1d6dd9f7f51fb452baf8.tar.gz linux-fedc459a3da35ecf171a1d6dd9f7f51fb452baf8.tar.bz2 linux-fedc459a3da35ecf171a1d6dd9f7f51fb452baf8.zip |
rtc: pcf2123: fix negative offset rounding
Using result = (value + divisor/2) / divisor is rounding values up and only
works well for positive values. Instead use DIV_ROUND_CLOSEST which does
the correct thing.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-pxa.c')
0 files changed, 0 insertions, 0 deletions