aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>2017-11-07 23:27:45 -0500
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2017-11-08 19:16:36 -0500
commit1856e0b2ace70a0231a94ec9d1286904c6ffa1ca (patch)
tree7ef162b3aa779803452774496a3261bc5baefd37
parenta3350f9c57ffad569c40f7320b89da1f3061c5bb (diff)
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 <alexandre.belloni@free-electrons.com>
-rw-r--r--drivers/rtc/rtc-pcf8563.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index 8c836c51a508..3efc86c25d27 100644
--- a/drivers/rtc/rtc-pcf8563.c
+++ b/drivers/rtc/rtc-pcf8563.c
@@ -387,7 +387,7 @@ static int pcf8563_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *tm)
387 if (err) 387 if (err)
388 return err; 388 return err;
389 389
390 return pcf8563_set_alarm_mode(client, 1); 390 return pcf8563_set_alarm_mode(client, !!tm->enabled);
391} 391}
392 392
393static int pcf8563_irq_enable(struct device *dev, unsigned int enabled) 393static int pcf8563_irq_enable(struct device *dev, unsigned int enabled)