From: nicolas.ferre@atmel•com (Nicolas Ferre)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 2/9] ARM: at91/snapper9260: move gpio_to_irq out of structure initialization
Date: Tue, 14 Feb 2012 10:04:08 +0100 [thread overview]
Message-ID: <4F3A2388.7060801@atmel.com> (raw)
In-Reply-To: <4F396C4C.9060108@gmail.com>
On 02/13/2012 09:02 PM, Ryan Mallon :
> On 14/02/12 01:43, Nicolas Ferre wrote:
>
>> gpio_to_irq() implementation will be moved from a macro to a
>> plain function: we cannot use it in a structure initialization
>> anymore.
>
> What was the reason for the change? It was originally a macro for
> exactly this reason.
Linux vIRQ numbers will be allocated dynamically when switching to
irqdomains. That will prevent the use of a static operation in a macro.
> Reviewed-by: Ryan Mallon <rmallon@gmail•com>
Thanks.
>> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel•com>
>> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft•com>
>> Cc: rmallon at gmail.com
>> ---
>> arch/arm/mach-at91/board-snapper9260.c | 10 +++++++---
>> 1 files changed, 7 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm/mach-at91/board-snapper9260.c b/arch/arm/mach-at91/board-snapper9260.c
>> index 4770db0..3c2e3fc 100644
>> --- a/arch/arm/mach-at91/board-snapper9260.c
>> +++ b/arch/arm/mach-at91/board-snapper9260.c
>> @@ -145,11 +145,11 @@ static struct i2c_board_info __initdata snapper9260_i2c_devices[] = {
>> /* Audio codec */
>> I2C_BOARD_INFO("tlv320aic23", 0x1a),
>> },
>> - {
>> +};
>> +
>> +static struct i2c_board_info __initdata snapper9260_i2c_isl1208 = {
>> /* RTC */
>> I2C_BOARD_INFO("isl1208", 0x6f),
>> - .irq = gpio_to_irq(AT91_PIN_PA31),
>> - },
>> };
>>
>> static void __init snapper9260_add_device_nand(void)
>> @@ -163,6 +163,10 @@ static void __init snapper9260_board_init(void)
>> {
>> at91_add_device_i2c(snapper9260_i2c_devices,
>> ARRAY_SIZE(snapper9260_i2c_devices));
>> +
>> + snapper9260_i2c_isl1208.irq = gpio_to_irq(AT91_PIN_PA31);
>> + i2c_register_board_info(0, &snapper9260_i2c_isl1208, 1);
>> +
>> at91_add_device_serial();
>> at91_add_device_usbh(&snapper9260_usbh_data);
>> at91_add_device_udc(&snapper9260_udc_data);
>
>
>
--
Nicolas Ferre
next prev parent reply other threads:[~2012-02-14 9:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-13 14:43 [PATCH 0/9] ARM: at91: irqdomain and device tree for AIC and GPIO Nicolas Ferre
2012-02-13 14:43 ` [PATCH v5 1/9] ARM: at91/aic: add irq domain and device tree support Nicolas Ferre
2012-02-13 22:10 ` Rob Herring
2012-02-14 10:24 ` Nicolas Ferre
2012-02-14 14:11 ` Rob Herring
2012-02-17 9:26 ` Nicolas Ferre
2012-02-13 14:43 ` [PATCH 2/9] ARM: at91/snapper9260: move gpio_to_irq out of structure initialization Nicolas Ferre
2012-02-13 20:02 ` Ryan Mallon
2012-02-14 9:04 ` Nicolas Ferre [this message]
2012-02-14 9:48 ` Russell King - ARM Linux
2012-02-13 14:43 ` [PATCH 3/9] ARM/USB: at91/ohci-at91: remove the use of irq_to_gpio Nicolas Ferre
2012-02-17 9:41 ` Nicolas Ferre
2012-02-17 16:59 ` Greg Kroah-Hartman
2012-02-13 14:43 ` [PATCH 4/9] ARM: at91/gpio: change comments and one variable name Nicolas Ferre
2012-02-13 14:43 ` [PATCH v5 5/9] ARM: at91/gpio: add irqdomain and DT support Nicolas Ferre
2012-02-13 14:43 ` [PATCH 6/9] ARM: at91/gpio: non-DT builds do not have gpio_chip.of_node field Nicolas Ferre
2012-02-13 14:43 ` [PATCH 7/9] ARM: at91/gpio: add .to_irq gpio_chip handler Nicolas Ferre
2012-02-13 14:43 ` [PATCH 8/9] ARM: at91/gpio: remove the static specification of gpio_chip.base Nicolas Ferre
2012-02-13 14:43 ` [PATCH 9/9] ARM: at91/board-dt: remove AIC irq domain from board file Nicolas Ferre
2012-02-17 9:27 ` [PATCH] ARM: at91: AIC and GPIO IRQ device tree initilization Nicolas Ferre
2012-02-21 10:06 ` Nicolas Ferre
2012-02-21 10:16 ` Russell King - ARM Linux
2012-02-21 14:07 ` Rob Herring
2012-02-22 9:07 ` Nicolas Ferre
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=4F3A2388.7060801@atmel.com \
--to=nicolas.ferre@atmel$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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