linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: eric.y.miao@gmail.com (Eric Miao)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pxa270 rtc wakeup event fix
Date: Tue, 12 Apr 2011 21:47:46 +0800	[thread overview]
Message-ID: <BANLkTi=ZJ2utAwpnADMdLWx5SEnLqwX18g@mail.gmail.com> (raw)
In-Reply-To: <201104121253.38937.marek.vasut@gmail.com>

On Tue, Apr 12, 2011 at 6:53 PM, Marek Vasut <marek.vasut@gmail.com> wrote:
> On Tuesday 12 April 2011 09:44:17 Eric Miao wrote:
>> Hi Nick,
>>
>> Thanks for spotting this. The problem is really IRQ_TO_GPIO() macro
>> doesn't behave as assumed. A better approach would be to return -1
>> when none-GPIO IRQs are mapped back, let me know if you are OK w/
>> the patch below:
>>
>> diff --git a/arch/arm/mach-pxa/include/mach/gpio.h
>> b/arch/arm/mach-pxa/include/mach/gpio.h
>> index b024a8b..b9f4ed1 100644
>> --- a/arch/arm/mach-pxa/include/mach/gpio.h
>> +++ b/arch/arm/mach-pxa/include/mach/gpio.h
>> @@ -103,7 +103,20 @@
>>
>> ?#define gpio_to_bank(gpio) ? ((gpio) >> 5)
>> ?#define gpio_to_irq(gpio) ? ?IRQ_GPIO(gpio)
>> -#define irq_to_gpio(irq) ? ? IRQ_TO_GPIO(irq)
>> +
>> +static inline int irq_to_gpio(unsigned int irq)
>
> Maybe drop the explicit inline?

It's in a header file, and has to be declared as inline to avoid the
copy being duplicated in every .c files where this header is included.

      reply	other threads:[~2011-04-12 13:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08 16:42 [PATCH] pxa270 rtc wakeup event fix Nick Bane
2011-04-08 19:36 ` Marek Vasut
2011-04-12  7:44   ` Eric Miao
2011-04-12  8:28     ` Nick Bane
2011-04-12  9:56       ` Igor Grinberg
2011-04-12 10:53     ` Marek Vasut
2011-04-12 13:47       ` Eric Miao [this message]

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='BANLkTi=ZJ2utAwpnADMdLWx5SEnLqwX18g@mail.gmail.com' \
    --to=eric.y.miao@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).