diff options
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-tps6586x.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-tps6586x.c b/drivers/rtc/rtc-tps6586x.c index 7d203b37e6e8..d5280d050d4b 100644 --- a/drivers/rtc/rtc-tps6586x.c +++ b/drivers/rtc/rtc-tps6586x.c @@ -212,8 +212,10 @@ static int tps6586x_rtc_alarm_irq_enable(struct device *dev, return err; } - if (!rtc->irq_en) + if (!rtc->irq_en) { enable_irq(rtc->irq); + rtc->irq_en = true; + } } else { err = tps6586x_clr_bits(tps_dev, RTC_CTRL, RTC_ENABLE); if (err < 0) { @@ -221,8 +223,10 @@ static int tps6586x_rtc_alarm_irq_enable(struct device *dev, return err; } - if (rtc->irq_en) + if (rtc->irq_en) { disable_irq(rtc->irq); + rtc->irq_en = false; + } } return 0; |