lkml.org 
[lkml]   [2013]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] rtc: core: Prevent repeated calling of alarm_irq_enable().
Date
This patch removes repeated execution of disabling alarm in
rtc_alarm_irq_enable() of rtc core interface. It made useless
call even all alarm had been disabled from rtc_timer_remove().
We'd better to skip disabling alarm when timer queue is empty.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
---
drivers/rtc/interface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index 9592b93..11cfb76 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -428,7 +428,7 @@ int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled)
rtc_timer_remove(rtc, &rtc->aie_timer);
}

- if (err)
+ if (err || !rtc->timerqueue.next)
/* nothing */;
else if (!rtc->ops)
err = -ENODEV;
--
1.7.9.5


\
 
 \ /
  Last update: 2013-02-06 13:02    [W:0.044 / U:1.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site