[PATCH] pxa270 rtc wakeup event fix
Eric Miao
eric.y.miao at gmail.com
Tue Apr 12 09:47:46 EDT 2011
On Tue, Apr 12, 2011 at 6:53 PM, Marek Vasut <marek.vasut at 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.
More information about the linux-arm-kernel
mailing list