public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Benoît Thébaudeau" <benoit@wsystem.com>
To: rtc-linux@googlegroups.com
Cc: linux-kernel@vger.kernel.org,
	"Alessandro Zummo" <a.zummo@towertech.it>,
	"Alexandre Belloni" <alexandre.belloni@free-electrons.com>,
	"Benoît Thébaudeau" <benoit@wsystem.com>
Subject: [PATCH 2/6] rtc: rv8803: Remove the check for valid time
Date: Thu, 21 Jul 2016 12:41:28 +0200	[thread overview]
Message-ID: <1469097692-103146-2-git-send-email-benoit@wsystem.com> (raw)
In-Reply-To: <1469097692-103146-1-git-send-email-benoit@wsystem.com>

The RTC core always calls rtc_valid_tm() after ->read_time() in case of
success (in __rtc_read_time()), so do not call it twice.

Signed-off-by: Benoît Thébaudeau <benoit@wsystem.com>
---
 drivers/rtc/rtc-rv8803.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-rv8803.c b/drivers/rtc/rtc-rv8803.c
index 05c79c3..e740c83 100644
--- a/drivers/rtc/rtc-rv8803.c
+++ b/drivers/rtc/rtc-rv8803.c
@@ -150,7 +150,7 @@ static int rv8803_get_time(struct device *dev, struct rtc_time *tm)
 	tm->tm_mon  = bcd2bin(date[RV8803_MONTH] & 0x1f) - 1;
 	tm->tm_year = bcd2bin(date[RV8803_YEAR]) + 100;
 
-	return rtc_valid_tm(tm);
+	return 0;
 }
 
 static int rv8803_set_time(struct device *dev, struct rtc_time *tm)
-- 
2.5.0

  reply	other threads:[~2016-07-21 10:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21 10:41 [PATCH 1/6] rtc: rv8803: Kconfig: Indicate rx8900 support Benoît Thébaudeau
2016-07-21 10:41 ` Benoît Thébaudeau [this message]
2016-07-21 10:41 ` [PATCH 3/6] rtc: rv8803: Fix read day of week Benoît Thébaudeau
2016-07-21 10:41 ` [PATCH 4/6] rtc: rv8803: Always apply the I²C workaround Benoît Thébaudeau
2016-07-21 11:10   ` Alexandre Belloni
2016-07-21 12:34     ` Benoît Thébaudeau
2016-07-21 18:30     ` Benoît Thébaudeau
2016-07-21 10:41 ` [PATCH 5/6] rtc: rv8803: Stop the clock while setting the time Benoît Thébaudeau
2016-07-21 10:41 ` [PATCH 6/6] rtc: rv8803: Clear V1F when " Benoît Thébaudeau
2016-07-28  8:00 ` [PATCH 1/6] rtc: rv8803: Kconfig: Indicate rx8900 support Alexandre Belloni

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=1469097692-103146-2-git-send-email-benoit@wsystem.com \
    --to=benoit@wsystem.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.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