summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-88pm80x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-88pm80x.c')
-rw-r--r--drivers/rtc/rtc-88pm80x.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/rtc/rtc-88pm80x.c b/drivers/rtc/rtc-88pm80x.c
index 6cbafefa80a2..76df274f3e1a 100644
--- a/drivers/rtc/rtc-88pm80x.c
+++ b/drivers/rtc/rtc-88pm80x.c
@@ -254,8 +254,6 @@ static int pm80x_rtc_probe(struct platform_device *pdev)
254 struct pm80x_rtc_pdata *pdata = dev_get_platdata(&pdev->dev); 254 struct pm80x_rtc_pdata *pdata = dev_get_platdata(&pdev->dev);
255 struct pm80x_rtc_info *info; 255 struct pm80x_rtc_info *info;
256 struct device_node *node = pdev->dev.of_node; 256 struct device_node *node = pdev->dev.of_node;
257 struct rtc_time tm;
258 unsigned long ticks = 0;
259 int ret; 257 int ret;
260 258
261 if (!pdata && !node) { 259 if (!pdata && !node) {
@@ -302,26 +300,6 @@ static int pm80x_rtc_probe(struct platform_device *pdev)
302 goto out; 300 goto out;
303 } 301 }
304 302
305 ret = pm80x_rtc_read_time(&pdev->dev, &tm);
306 if (ret < 0) {
307 dev_err(&pdev->dev, "Failed to read initial time.\n");
308 goto out_rtc;
309 }
310 if ((tm.tm_year < 70) || (tm.tm_year > 138)) {
311 tm.tm_year = 70;
312 tm.tm_mon = 0;
313 tm.tm_mday = 1;
314 tm.tm_hour = 0;
315 tm.tm_min = 0;
316 tm.tm_sec = 0;
317 ret = pm80x_rtc_set_time(&pdev->dev, &tm);
318 if (ret < 0) {
319 dev_err(&pdev->dev, "Failed to set initial time.\n");
320 goto out_rtc;
321 }
322 }
323 rtc_tm_to_time(&tm, &ticks);
324
325 info->rtc_dev = devm_rtc_device_register(&pdev->dev, "88pm80x-rtc", 303 info->rtc_dev = devm_rtc_device_register(&pdev->dev, "88pm80x-rtc",
326 &pm80x_rtc_ops, THIS_MODULE); 304 &pm80x_rtc_ops, THIS_MODULE);
327 if (IS_ERR(info->rtc_dev)) { 305 if (IS_ERR(info->rtc_dev)) {