mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Zhong <zyw@rock-chips.com>
To: akpm@linux-foundation.org
Cc: zhangqing@rock-chips.com, xxx@rock-chips.com,
	dianders@chromium.org, heiko@sntech.de,
	Chris Zhong <zyw@rock-chips.com>,
	Alessandro Zummo <a.zummo@towertech.it>,
	rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org
Subject: [PATCH] RTC: RK808: remove tm_def structure
Date: Thu, 11 Sep 2014 10:04:52 +0800	[thread overview]
Message-ID: <1410401092-8355-1-git-send-email-zyw@rock-chips.com> (raw)

Signed-off-by: Chris Zhong <zyw@rock-chips.com>

---

 drivers/rtc/rtc-rk808.c |   17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/drivers/rtc/rtc-rk808.c b/drivers/rtc/rtc-rk808.c
index 22c8514..df42257 100644
--- a/drivers/rtc/rtc-rk808.c
+++ b/drivers/rtc/rtc-rk808.c
@@ -325,17 +325,6 @@ static int rk808_rtc_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(rk808_rtc_pm_ops,
 	rk808_rtc_suspend, rk808_rtc_resume);
 
-/* 2014.1.1 12:00:00 Saturday */
-static struct rtc_time tm_def = {
-	.tm_wday = 6,
-	.tm_year = 114,
-	.tm_mon = 0,
-	.tm_mday = 1,
-	.tm_hour = 12,
-	.tm_min = 0,
-	.tm_sec = 0,
-};
-
 static int rk808_rtc_probe(struct platform_device *pdev)
 {
 	struct rk808 *rk808 = dev_get_drvdata(pdev->dev.parent);
@@ -376,10 +365,8 @@ static int rk808_rtc_probe(struct platform_device *pdev)
 		return ret;
 	}
 	ret = rtc_valid_tm(&tm);
-	if (ret) {
-		dev_warn(&pdev->dev, "invalid date/time and init time\n");
-		rk808_rtc_set_time(&pdev->dev, &tm_def);
-	}
+	if (ret)
+		dev_warn(&pdev->dev, "invalid date/time\n");
 
 	device_init_wakeup(&pdev->dev, 1);
 
-- 
1.7.9.5


             reply	other threads:[~2014-09-11  2:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11  2:04 Chris Zhong [this message]
2014-09-11  4:04 ` Doug Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1410401092-8355-1-git-send-email-zyw@rock-chips.com \
    --to=zyw@rock-chips.com \
    --cc=a.zummo@towertech.it \
    --cc=akpm@linux-foundation.org \
    --cc=dianders@chromium.org \
    --cc=heiko@sntech.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=xxx@rock-chips.com \
    --cc=zhangqing@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®