diff options
| author | Jean-Francois Dagenais <[email protected]> | 2019-11-27 20:56:12 -0500 |
|---|---|---|
| committer | Alexandre Belloni <[email protected]> | 2019-12-10 16:49:20 +0100 |
| commit | 519d63702d0e710fd02dabce1370eaa24dfb5fc8 (patch) | |
| tree | e4fe97084562ec00f06733b808e079552f3e6b12 | |
| parent | 94a25071301a898d8c603db2f05a0016eb7b7d28 (diff) | |
rtc: zynqmp: re-use rtc_time64_to_tm operation
This allows a subsequent commit to spin_unlock sooner.
Signed-off-by: Jean-Francois Dagenais <[email protected]>
Reviewed-by: Michal Simek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexandre Belloni <[email protected]>
| -rw-r--r-- | drivers/rtc/rtc-zynqmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-zynqmp.c b/drivers/rtc/rtc-zynqmp.c index 539690568298..5786866c09e9 100644 --- a/drivers/rtc/rtc-zynqmp.c +++ b/drivers/rtc/rtc-zynqmp.c @@ -94,7 +94,7 @@ static int xlnx_rtc_read_time(struct device *dev, struct rtc_time *tm) * RTC has updated the CURRENT_TIME with the time written into * SET_TIME_WRITE register. */ - rtc_time64_to_tm(readl(xrtcdev->reg_base + RTC_CUR_TM), tm); + read_time = readl(xrtcdev->reg_base + RTC_CUR_TM); } else { /* * Time written in SET_TIME_WRITE has not yet updated into @@ -104,8 +104,8 @@ static int xlnx_rtc_read_time(struct device *dev, struct rtc_time *tm) * reading. */ read_time = readl(xrtcdev->reg_base + RTC_SET_TM_RD) - 1; - rtc_time64_to_tm(read_time, tm); } + rtc_time64_to_tm(read_time, tm); return 0; } |