Commit 1ebb909d authored by Alexandre Belloni's avatar Alexandre Belloni

rtc: tx4939: use .set_time

Switch from .set_mmss to .set_time as the former is deprecated.
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent e230b2c2
...@@ -65,10 +65,11 @@ static int tx4939_rtc_cmd(struct tx4939_rtc_reg __iomem *rtcreg, int cmd) ...@@ -65,10 +65,11 @@ static int tx4939_rtc_cmd(struct tx4939_rtc_reg __iomem *rtcreg, int cmd)
return 0; 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 tx4939rtc_plat_data *pdata = get_tx4939rtc_plat_data(dev);
struct tx4939_rtc_reg __iomem *rtcreg = pdata->rtcreg; struct tx4939_rtc_reg __iomem *rtcreg = pdata->rtcreg;
unsigned long secs = rtc_tm_to_time64(tm);
int i, ret; int i, ret;
unsigned char buf[6]; unsigned char buf[6];
...@@ -203,7 +204,7 @@ static const struct rtc_class_ops tx4939_rtc_ops = { ...@@ -203,7 +204,7 @@ static const struct rtc_class_ops tx4939_rtc_ops = {
.read_time = tx4939_rtc_read_time, .read_time = tx4939_rtc_read_time,
.read_alarm = tx4939_rtc_read_alarm, .read_alarm = tx4939_rtc_read_alarm,
.set_alarm = tx4939_rtc_set_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, .alarm_irq_enable = tx4939_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