From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Nishanth Menon <nm@ti.com>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>,
Alessandro Zummo <a.zummo@towertech.it>
Cc: linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
balbi@ti.com
Subject: Re: [PATCH V2 4/5] drivers/rtc/rtc-ds1307.c: Support optional wakeup interrupt source
Date: Wed, 24 Jun 2015 19:25:07 +0300 [thread overview]
Message-ID: <558AD9E3.3070309@ti.com> (raw)
In-Reply-To: <558AD5B1.8030406@ti.com>
On 06/24/2015 07:07 PM, Nishanth Menon wrote:
> On 06/24/2015 10:36 AM, Grygorii Strashko wrote:
>> On 06/23/2015 07:15 PM, Nishanth Menon wrote:
> [...]
>
>>> + ds1307->wakeirq = of_irq_get(node, 1);
>>> + if (ds1307->wakeirq <= 0) {
>>> + if (ds1307->wakeirq == -EPROBE_DEFER) {
>>> + err = ds1307->wakeirq;
>>> + goto exit;
>>> + }
>>> + ds1307->wakeirq = 0;
>>> + goto no_irq;
>>> + }
>>
>> Might be above code could be done a little bit simpler?
>>
>> err = of_irq_get(node, 1);
>> if (err <= 0) {
>> if (err == -EPROBE_DEFER)
>> goto exit;
>> goto no_irq;
>
> I had considered it, but problem with this approach is that is err
> does not get reset back to 0 and probe will fail as it flows through
> the rest of the code.. which is not our intent.
>
>> }
>> ds1307->wakeirq = err;
As I can see from final code (after applying all patches) - It should work.
But I will not insist :)
--
regards,
-grygorii
next prev parent reply other threads:[~2015-06-24 16:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-23 16:15 [PATCH V2 0/5] drivers/rtc/rtc-ds1307.c: Basic cleanups and support for wakeupirq Nishanth Menon
2015-06-23 16:15 ` [PATCH V2 1/5] drivers/rtc/rtc-ds1307.c: Convert to threaded IRQ Nishanth Menon
2015-06-23 16:15 ` [PATCH V2 2/5] drivers/rtc/rtc-ds1307.c: Switch to managed irq allocation Nishanth Menon
2015-06-23 16:15 ` [PATCH V2 3/5] drivers/rtc/rtc-ds1307.c: Sort the headers Nishanth Menon
2015-06-23 16:15 ` [PATCH V2 4/5] drivers/rtc/rtc-ds1307.c: Support optional wakeup interrupt source Nishanth Menon
2015-06-24 10:54 ` Tony Lindgren
2015-06-24 15:36 ` Grygorii Strashko
2015-06-24 16:07 ` Nishanth Menon
2015-06-24 16:25 ` Grygorii Strashko [this message]
2015-06-24 16:26 ` Nishanth Menon
2015-06-25 17:23 ` Grygorii Strashko
2015-07-01 12:54 ` Alexandre Belloni
2015-06-23 16:15 ` [TMP PATCH V2 5/5] ARM: dts: am57xx-beagle-x15: Add wakeup irq for mcp79410 Nishanth Menon
2015-06-24 14:34 ` [PATCH V2 0/5] drivers/rtc/rtc-ds1307.c: Basic cleanups and support for wakeupirq Felipe Balbi
2015-06-24 15:37 ` Grygorii Strashko
2015-07-02 22:47 ` Alexandre Belloni
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=558AD9E3.3070309@ti.com \
--to=grygorii.strashko@ti.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@free-electrons.com \
--cc=balbi@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
--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;
as well as URLs for NNTP newsgroup(s).