summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-tx4939.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2019-03-03 23:19:30 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2019-03-03 23:19:30 +0100
commit1ebb909d5aa2c53973cbdcde7629fa50c0a56c21 (patch)
treede60ff4ad13bf5ca9e90080b7a4f210044344aa7 /drivers/rtc/rtc-tx4939.c
parente230b2c26dbad465f9e8a11a33be7b67b0be242e (diff)
rtc: tx4939: use .set_time
Switch from .set_mmss to .set_time as the former is deprecated. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-tx4939.c')
-rw-r--r--drivers/rtc/rtc-tx4939.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-tx4939.c b/drivers/rtc/rtc-tx4939.c
index 8acb8adc11d7..404de455409b 100644
--- a/drivers/rtc/rtc-tx4939.c
+++ b/drivers/rtc/rtc-tx4939.c
@@ -65,10 +65,11 @@ static int tx4939_rtc_cmd(struct tx4939_rtc_reg __iomem *rtcreg, int cmd)
return 0;
}
-static int tx4939_rtc_set_mmss(struct device *dev, unsigned long secs)
+static int tx4939_rtc_set_time(struct device *dev, struct rtc_time *tm)
{
struct tx4939rtc_plat_data *pdata = get_tx4939rtc_plat_data(dev);
struct tx4939_rtc_reg __iomem *rtcreg = pdata->rtcreg;
+ unsigned long secs = rtc_tm_to_time64(tm);
int i, ret;
unsigned char buf[6];
@@ -203,7 +204,7 @@ static const struct rtc_class_ops tx4939_rtc_ops = {
.read_time = tx4939_rtc_read_time,
.read_alarm = tx4939_rtc_read_alarm,
.set_alarm = tx4939_rtc_set_alarm,
- .set_mmss = tx4939_rtc_set_mmss,
+ .set_time = tx4939_rtc_set_time,
.alarm_irq_enable = tx4939_rtc_alarm_irq_enable,
};