mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
rtc: 88pm860x: stop setting a default time
It doesn't make sense to set the RTC to a default value at probe time. Let the core handle invalid date and time. Link: https://lore.kernel.org/r/20200311223956.51352-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
9cf4789e6e
commit
b773f2a97f
1 changed files with 0 additions and 13 deletions
|
@ -360,19 +360,6 @@ static int pm860x_rtc_probe(struct platform_device *pdev)
|
|||
dev_err(&pdev->dev, "Failed to read initial time.\n");
|
||||
return ret;
|
||||
}
|
||||
if ((tm.tm_year < 70) || (tm.tm_year > 138)) {
|
||||
tm.tm_year = 70;
|
||||
tm.tm_mon = 0;
|
||||
tm.tm_mday = 1;
|
||||
tm.tm_hour = 0;
|
||||
tm.tm_min = 0;
|
||||
tm.tm_sec = 0;
|
||||
ret = pm860x_rtc_set_time(&pdev->dev, &tm);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "Failed to set initial time.\n");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
rtc_tm_to_time(&tm, &ticks);
|
||||
if (pm860x_rtc_dt_init(pdev, info)) {
|
||||
if (pdata && pdata->sync) {
|
||||
|
|
Loading…
Reference in a new issue