The data_year_param struct is never modified, so lets constify it.
This permit to remove cast since of_device_id is const also.
Signed-off-by: LABBE Corentin <[email protected]>
Acked-by: Chen-Yu Tsai <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
The variable year must be set as unsigned since it is used with
sunxi_rtc_data_year{.min|.max} and as parameter of is_leap_year() which
wait for unsigned int.
Only tm_year is not unsigned, but it is long.
This patch fix also the format of printing of min/max. (must use %u since
they are unsigned)
The parameter to of sunxi_rtc_setaie() must be set to uint since callers
give always uint data.
Signed-off-by: LABBE Corentin <[email protected]>
Acked-by: Chen-Yu Tsai <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
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 <[email protected]>
Signed-off-by: Xunlei Pang <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
The Allwinner A10 compatibles were following a slightly different
compatible patterns than the rest of the SoCs for historical reasons.
Change the compatibles to match the other pattern in the RTC driver for
consistency.
Signed-off-by: Maxime Ripard <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This patch introduces the driver for the RTC in the Allwinner A10 and
A20 SoCs.
Signed-off-by: Carlo Caione <[email protected]>
Acked-by: Alessandro Zummo <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>