Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab62670e authored by Alexandre Belloni's avatar Alexandre Belloni
Browse files

rtc: stop validating rtc_time after rtc_time_to_tm



rtc_time_to_tm never generates an invalid tm. It is not necessary to
validate it.

Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 146d21bd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -131,7 +131,7 @@ static int ab8500_rtc_read_time(struct device *dev, struct rtc_time *tm)
	secs += get_elapsed_seconds(AB8500_RTC_EPOCH);

	rtc_time_to_tm(secs, tm);
	return rtc_valid_tm(tm);
	return 0;
}

static int ab8500_rtc_set_time(struct device *dev, struct rtc_time *tm)
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ static int coh901331_read_time(struct device *dev, struct rtc_time *tm)
	if (readl(rtap->virtbase + COH901331_VALID)) {
		rtc_time_to_tm(readl(rtap->virtbase + COH901331_CUR_TIME), tm);
		clk_disable(rtap->clk);
		return rtc_valid_tm(tm);
		return 0;
	}
	clk_disable(rtap->clk);
	return -EINVAL;
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ static int jz4740_rtc_read_time(struct device *dev, struct rtc_time *time)

	rtc_time_to_tm(secs, time);

	return rtc_valid_tm(time);
	return 0;
}

static int jz4740_rtc_set_mmss(struct device *dev, unsigned long secs)
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ static int lpc32xx_rtc_read_time(struct device *dev, struct rtc_time *time)
	elapsed_sec = rtc_readl(rtc, LPC32XX_RTC_UCOUNT);
	rtc_time_to_tm(elapsed_sec, time);

	return rtc_valid_tm(time);
	return 0;
}

static int lpc32xx_rtc_set_mmss(struct device *dev, unsigned long secs)
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ static int ls1x_rtc_read_time(struct device *dev, struct rtc_time *rtm)
			ls1x_get_min(v), ls1x_get_sec(v));
	rtc_time_to_tm(t, rtm);

	return rtc_valid_tm(rtm);
	return 0;
}

static int ls1x_rtc_set_time(struct device *dev, struct  rtc_time *rtm)
Loading