rtc: simplify implementations of read_alarm
Since commit d68778b80d
("rtc: initialize output parameter for read
alarm to "uninitialized"") there is no need to explicitly set
unsupported members to -1. So drop the respective assignments from
drivers.
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
This commit is contained in:

committed by
Alexandre Belloni

parent
e29385fab0
commit
56d86a7e79
@@ -179,12 +179,6 @@ static int tegra_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
|
||||
if (sec == 0) {
|
||||
/* alarm is disabled. */
|
||||
alarm->enabled = 0;
|
||||
alarm->time.tm_mon = -1;
|
||||
alarm->time.tm_mday = -1;
|
||||
alarm->time.tm_year = -1;
|
||||
alarm->time.tm_hour = -1;
|
||||
alarm->time.tm_min = -1;
|
||||
alarm->time.tm_sec = -1;
|
||||
} else {
|
||||
/* alarm is enabled. */
|
||||
alarm->enabled = 1;
|
||||
|
Reference in New Issue
Block a user