From: Jonghwa Lee <jonghwa3.lee@samsung.com>
To: linux-kernel@vger.kernel.org
Cc: a.zummo@towertech.it, Andrew Morton <akpm@linux-foundation.org>,
rtc-linux@googlegroups.com,
Jonghwa Lee <jonghwa3.lee@samsung.com>
Subject: [PATCH] rtc: core: Prevent repeated calling of alarm_irq_enable().
Date: Wed, 06 Feb 2013 20:22:45 +0900 [thread overview]
Message-ID: <1360149765-19565-1-git-send-email-jonghwa3.lee@samsung.com> (raw)
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
next reply other threads:[~2013-02-06 11:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-06 11:22 Jonghwa Lee [this message]
2013-02-06 21:12 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1360149765-19565-1-git-send-email-jonghwa3.lee@samsung.com \
--to=jonghwa3.lee@samsung.com \
--cc=a.zummo@towertech.it \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®