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

Commit 22652ba7 authored by Alexandre Belloni's avatar Alexandre Belloni
Browse files

rtc: stop validating rtc_time in .read_time



The RTC core is always calling rtc_valid_tm after the read_time callback.
It is not necessary to call it just before returning from the callback.

Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent ab62670e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -387,7 +387,7 @@ static int ac100_rtc_get_time(struct device *dev, struct rtc_time *rtc_tm)
	rtc_tm->tm_year = bcd2bin(reg[6] & AC100_RTC_YEA_MASK) +
			  AC100_YEAR_OFF;

	return rtc_valid_tm(rtc_tm);
	return 0;
}

static int ac100_rtc_set_time(struct device *dev, struct rtc_time *rtc_tm)
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ static int au1xtoy_rtc_read_time(struct device *dev, struct rtc_time *tm)

	rtc_time_to_tm(t, tm);

	return rtc_valid_tm(tm);
	return 0;
}

static int au1xtoy_rtc_set_time(struct device *dev, struct rtc_time *tm)
+1 −1
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ static int bq32k_rtc_read_time(struct device *dev, struct rtc_time *tm)
	tm->tm_year = bcd2bin(regs.years) +
				((regs.cent_hours & BQ32K_CENT) ? 100 : 0);

	return rtc_valid_tm(tm);
	return 0;
}

static int bq32k_rtc_set_time(struct device *dev, struct rtc_time *tm)
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ static int ds1216_rtc_read_time(struct device *dev, struct rtc_time *tm)
	if (tm->tm_year < 70)
		tm->tm_year += 100;

	return rtc_valid_tm(tm);
	return 0;
}

static int ds1216_rtc_set_time(struct device *dev, struct rtc_time *tm)
+1 −1
Original line number Diff line number Diff line
@@ -211,7 +211,7 @@ static int ds1286_read_time(struct device *dev, struct rtc_time *tm)

	tm->tm_mon--;

	return rtc_valid_tm(tm);
	return 0;
}

static int ds1286_set_time(struct device *dev, struct rtc_time *tm)
Loading