]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
rtc: mt6397: fix build on some 32bits platforms
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Thu, 14 May 2015 20:39:06 +0000 (22:39 +0200)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Wed, 24 Jun 2015 23:13:36 +0000 (01:13 +0200)
commit9393996761e23280f259d706133c8f0cd139fd58
treedd7ed7e35fe64cd5b51222b67e3750c14a8a307a
parent99c14e4df6144bca12dcac657266a7b8216aaa16
rtc: mt6397: fix build on some 32bits platforms

On some !ARM 32bits platforms, the following compilation error happens
because of the division on a 64bits value in mtk_rtc_read_time():

drivers/built-in.o: In function `mtk_rtc_read_time':
rtc-mt6397.c:(.text+0x265d13f): undefined reference to `__divdi3'
rtc-mt6397.c:(.text+0x265d150): undefined reference to `__moddi3'

Use div_s64() as done in rtc_time64_to_tm() to solve that.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Acked-by: Eddie Huang <eddie.huang@mediatek.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-mt6397.c