[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20130206131225.83a118fe.akpm@linux-foundation.org>
Date: Wed, 6 Feb 2013 13:12:25 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Jonghwa Lee <jonghwa3.lee@...sung.com>
Cc: linux-kernel@...r.kernel.org, a.zummo@...ertech.it,
rtc-linux@...glegroups.com
Subject: Re: [PATCH] rtc: core: Prevent repeated calling of
alarm_irq_enable().
On Wed, 06 Feb 2013 20:22:45 +0900
Jonghwa Lee <jonghwa3.lee@...sung.com> wrote:
> 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.
>
I fear that patch does more than that.
> --- 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;
This will prevent the irq from being *enabled*, as well as disabled.
To match your description, we'd need to also check that enabled==0?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists