Skip to content

Commit 1856e0b

Browse files
rtc: pcf8563: don't alway enable the alarm
Allow setting the alarm and later enable it instead of enabling it unconditionally. Signed-off-by: Alexandre Belloni <[email protected]>
1 parent a3350f9 commit 1856e0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/rtc/rtc-pcf8563.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ static int pcf8563_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *tm)
387387
if (err)
388388
return err;
389389

390-
return pcf8563_set_alarm_mode(client, 1);
390+
return pcf8563_set_alarm_mode(client, !!tm->enabled);
391391
}
392392

393393
static int pcf8563_irq_enable(struct device *dev, unsigned int enabled)

0 commit comments

Comments
 (0)