rtc: sunxi: Replace deprecated rtc_tm_to_time()
authorXunlei Pang <pang.xunlei@linaro.org>
Fri, 12 Jun 2015 02:04:12 +0000 (10:04 +0800)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Wed, 24 Jun 2015 23:13:42 +0000 (01:13 +0200)
commit9033fd8ba7e96821e65fe3afc3f4077a8b66d1c9
treeae0657008e5171227c211bf488f818ba92d161f7
parentf118db1efdbd224b3e0dd174a8942471eee798a0
rtc: sunxi: Replace deprecated rtc_tm_to_time()

sunxi_rtc_setalarm() uses deprecated rtc_tm_to_time(),
which will overflow in year 2106 on 32-bit machines.

This patch solves this by:
- Replacing rtc_tm_to_time() with rtc_tm_sub()

Also remove the unnecessary initial zeroing of some
local variables in sunxi_rtc_setalarm().

Cc: Carlo Caione <carlo.caione@gmail.com>
Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-sunxi.c