From: Joe Perches <joe@perches.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Daniel Ribeiro <drwyrm@gmail.com>,
a.zummo@towertech.it, rtc-linux@googlegroups.com,
linux-kernel@vger.kernel.org, openezx-devel@lists.openezx.org,
sameo@linux.intel.com
Subject: Re: [PATCH] PCAP RTC driver (for 2.6.32).
Date: Fri, 26 Jun 2009 13:33:34 -0700 [thread overview]
Message-ID: <1246048414.18587.71.camel@Joe-Laptop.home> (raw)
In-Reply-To: <20090626132310.60665a98.akpm@linux-foundation.org>
On Fri, 2009-06-26 at 13:23 -0700, Andrew Morton wrote:
> > diff -puN /dev/null drivers/rtc/rtc-pcap.c
> > --- /dev/null
> > +++ a/drivers/rtc/rtc-pcap.c
[]
> > +static irqreturn_t pcap_rtc_irq(int irq, void *_pcap_rtc)
> > +{
> > + struct pcap_rtc *pcap_rtc = _pcap_rtc;
> > + unsigned long rtc_events = 0;
> > +
> > + if (irq == pcap_to_irq(pcap_rtc->pcap, PCAP_IRQ_1HZ))
> > + rtc_events |= RTC_IRQF | RTC_UF;
> > + else if (irq == pcap_to_irq(pcap_rtc->pcap, PCAP_IRQ_TODA))
> > + rtc_events |= RTC_IRQF | RTC_AF;
> > +
> > + rtc_update_irq(pcap_rtc->rtc, 1, rtc_events);
> > + return IRQ_HANDLED;
> > +}
>
> This could be coded more simply:
>
> unsigned long rtc_events;
>
> if (irq == pcap_to_irq(pcap_rtc->pcap, PCAP_IRQ_1HZ))
> rtc_events = RTC_IRQF | RTC_UF;
> else if (irq == pcap_to_irq(pcap_rtc->pcap, PCAP_IRQ_TODA))
> rtc_events = RTC_IRQF | RTC_AF;
else
rec_events = 0;
> > + rtc_update_irq(pcap_rtc->rtc, 1, rtc_events);
> > + return IRQ_HANDLED;
Does that buy any clarity?
next prev parent reply other threads:[~2009-06-26 20:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-25 20:45 Daniel Ribeiro
2009-06-25 20:53 ` [rtc-linux] " Alessandro Zummo
2009-06-25 21:16 ` Daniel Ribeiro
2009-06-25 21:21 ` [rtc-linux] " Alessandro Zummo
2009-06-26 20:23 ` Andrew Morton
2009-06-26 20:33 ` Joe Perches [this message]
2009-06-26 23:57 ` Daniel Ribeiro
2009-06-27 0:12 ` Andrew Morton
2009-06-27 3:50 ` [PATCHv2] " Daniel Ribeiro
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=1246048414.18587.71.camel@Joe-Laptop.home \
--to=joe@perches.com \
--cc=a.zummo@towertech.it \
--cc=akpm@linux-foundation.org \
--cc=drwyrm@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=openezx-devel@lists.openezx.org \
--cc=rtc-linux@googlegroups.com \
--cc=sameo@linux.intel.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®