aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-omap.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2018-02-21 11:33:37 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-03-02 10:12:21 +0100
commit7ddc153d5f9442124cc083b15489932e45202661 (patch)
tree25c1d12dccc310bd3a0de669e877c01b55d38782 /drivers/rtc/rtc-omap.c
parentrtc: max77686: stop validating rtc_time in .read_time (diff)
downloadlinux-dev-7ddc153d5f9442124cc083b15489932e45202661.tar.xz
linux-dev-7ddc153d5f9442124cc083b15489932e45202661.zip
rtc: omap: stop validating rtc_time in .set_time and .set_alarm
The RTC core is always validating the rtc_time struct before calling .set_time or .set_alarm. It is not necessary to do it again. Also, rtc_time_to_tm never generates an invalid rtc_tm (it can be out of range though). Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-omap.c')
-rw-r--r--drivers/rtc/rtc-omap.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
index e53cb27f4118..39086398833e 100644
--- a/drivers/rtc/rtc-omap.c
+++ b/drivers/rtc/rtc-omap.c
@@ -273,9 +273,6 @@ static int omap_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
/* this hardware doesn't support "don't care" alarm fields */
static int tm2bcd(struct rtc_time *tm)
{
- if (rtc_valid_tm(tm) != 0)
- return -EINVAL;
-
tm->tm_sec = bin2bcd(tm->tm_sec);
tm->tm_min = bin2bcd(tm->tm_min);
tm->tm_hour = bin2bcd(tm->tm_hour);