rtc: digicolor: use .set_time
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 30 Apr 2019 09:32:11 +0000 (11:32 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 8 May 2019 20:14:25 +0000 (22:14 +0200)
Use .set_time instead of the deprecated .set_mmss.

Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-digicolor.c

index e6e16aaac25406442b622ae65882f710dce5bb78..ed2fc1adafd5c0c5494016cf1325aed7cc0f80af 100644 (file)
@@ -106,11 +106,11 @@ static int dc_rtc_read_time(struct device *dev, struct rtc_time *tm)
        return 0;
 }
 
-static int dc_rtc_set_mmss(struct device *dev, unsigned long secs)
+static int dc_rtc_set_time(struct device *dev, struct rtc_time *tm)
 {
        struct dc_rtc *rtc = dev_get_drvdata(dev);
 
-       return dc_rtc_write(rtc, secs);
+       return dc_rtc_write(rtc, rtc_tm_to_time64(tm));
 }
 
 static int dc_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
@@ -161,7 +161,7 @@ static int dc_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
 
 static const struct rtc_class_ops dc_rtc_ops = {
        .read_time              = dc_rtc_read_time,
-       .set_mmss               = dc_rtc_set_mmss,
+       .set_time               = dc_rtc_set_time,
        .read_alarm             = dc_rtc_read_alarm,
        .set_alarm              = dc_rtc_set_alarm,
        .alarm_irq_enable       = dc_rtc_alarm_irq_enable,