Commit eee86dea authored by Alexandre Belloni's avatar Alexandre Belloni

rtc: mc13xxx: use .set_time

Use .set_time instead of the deprecated .set_mmss64.
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent e4ae7023
...@@ -89,14 +89,14 @@ static int mc13xxx_rtc_read_time(struct device *dev, struct rtc_time *tm) ...@@ -89,14 +89,14 @@ static int mc13xxx_rtc_read_time(struct device *dev, struct rtc_time *tm)
return 0; return 0;
} }
static int mc13xxx_rtc_set_mmss(struct device *dev, time64_t secs) static int mc13xxx_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ {
struct mc13xxx_rtc *priv = dev_get_drvdata(dev); struct mc13xxx_rtc *priv = dev_get_drvdata(dev);
unsigned int seconds, days; unsigned int seconds, days;
unsigned int alarmseconds; unsigned int alarmseconds;
int ret; int ret;
days = div_s64_rem(secs, SEC_PER_DAY, &seconds); days = div_s64_rem(rtc_tm_to_time64(tm), SEC_PER_DAY, &seconds);
mc13xxx_lock(priv->mc13xxx); mc13xxx_lock(priv->mc13xxx);
...@@ -253,7 +253,7 @@ static irqreturn_t mc13xxx_rtc_alarm_handler(int irq, void *dev) ...@@ -253,7 +253,7 @@ static irqreturn_t mc13xxx_rtc_alarm_handler(int irq, void *dev)
static const struct rtc_class_ops mc13xxx_rtc_ops = { static const struct rtc_class_ops mc13xxx_rtc_ops = {
.read_time = mc13xxx_rtc_read_time, .read_time = mc13xxx_rtc_read_time,
.set_mmss64 = mc13xxx_rtc_set_mmss, .set_time = mc13xxx_rtc_set_time,
.read_alarm = mc13xxx_rtc_read_alarm, .read_alarm = mc13xxx_rtc_read_alarm,
.set_alarm = mc13xxx_rtc_set_alarm, .set_alarm = mc13xxx_rtc_set_alarm,
.alarm_irq_enable = mc13xxx_rtc_alarm_irq_enable, .alarm_irq_enable = mc13xxx_rtc_alarm_irq_enable,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment