diff options
| author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-03-03 17:14:35 -0500 |
|---|---|---|
| committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-03-03 17:14:35 -0500 |
| commit | e230b2c26dbad465f9e8a11a33be7b67b0be242e (patch) | |
| tree | fa555294e031f1b4aadcf2039747ecca5240efd2 /drivers/rtc | |
| parent | e866cbdf6e775d14e0c7c3528b2d03ccc29647c1 (diff) | |
rtc: tx4939: switch to rtc_time64_to_tm/rtc_tm_to_time64
Call the 64bit versions of rtc_time_to_tm now that the range is enforced by
the core.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc')
| -rw-r--r-- | drivers/rtc/rtc-tx4939.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-tx4939.c b/drivers/rtc/rtc-tx4939.c index b405818933fb..8acb8adc11d7 100644 --- a/drivers/rtc/rtc-tx4939.c +++ b/drivers/rtc/rtc-tx4939.c | |||
| @@ -111,7 +111,7 @@ static int tx4939_rtc_read_time(struct device *dev, struct rtc_time *tm) | |||
| 111 | spin_unlock_irq(&pdata->lock); | 111 | spin_unlock_irq(&pdata->lock); |
| 112 | sec = ((unsigned long)buf[5] << 24) | (buf[4] << 16) | | 112 | sec = ((unsigned long)buf[5] << 24) | (buf[4] << 16) | |
| 113 | (buf[3] << 8) | buf[2]; | 113 | (buf[3] << 8) | buf[2]; |
| 114 | rtc_time_to_tm(sec, tm); | 114 | rtc_time64_to_tm(sec, tm); |
| 115 | return 0; | 115 | return 0; |
| 116 | } | 116 | } |
| 117 | 117 | ||
| @@ -123,7 +123,7 @@ static int tx4939_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) | |||
| 123 | unsigned long sec; | 123 | unsigned long sec; |
| 124 | unsigned char buf[6]; | 124 | unsigned char buf[6]; |
| 125 | 125 | ||
| 126 | rtc_tm_to_time(&alrm->time, &sec); | 126 | sec = rtc_tm_to_time64(&alrm->time); |
| 127 | buf[0] = 0; | 127 | buf[0] = 0; |
| 128 | buf[1] = 0; | 128 | buf[1] = 0; |
| 129 | buf[2] = sec; | 129 | buf[2] = sec; |
| @@ -166,7 +166,7 @@ static int tx4939_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) | |||
| 166 | spin_unlock_irq(&pdata->lock); | 166 | spin_unlock_irq(&pdata->lock); |
| 167 | sec = ((unsigned long)buf[5] << 24) | (buf[4] << 16) | | 167 | sec = ((unsigned long)buf[5] << 24) | (buf[4] << 16) | |
| 168 | (buf[3] << 8) | buf[2]; | 168 | (buf[3] << 8) | buf[2]; |
| 169 | rtc_time_to_tm(sec, &alrm->time); | 169 | rtc_time64_to_tm(sec, &alrm->time); |
| 170 | return rtc_valid_tm(&alrm->time); | 170 | return rtc_valid_tm(&alrm->time); |
| 171 | } | 171 | } |
| 172 | 172 | ||
