Skip to content

Commit

Permalink
ARM: sa11x0: fix collie build error
Browse files Browse the repository at this point in the history
f408c98 (GPIO: sa1100: implement proper gpiolib gpio_to_irq conversion)
made gpio_to_irq() a function.  This breaks collie where it's used to
initialize some static data.  Fix that by moving the initialization to
the init code.

arch/arm/mach-sa1100/collie.c:139: error: initializer element is not constant
arch/arm/mach-sa1100/collie.c:139: error: (near initialization for 'collie_power_resource[0].start')
arch/arm/mach-sa1100/collie.c:140: error: initializer element is not constant
arch/arm/mach-sa1100/collie.c:140: error: (near initialization for 'collie_power_resource[0].end')

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Jan 19, 2012
1 parent 57270fc commit 5f76559
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/arm/mach-sa1100/collie.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ static struct pda_power_pdata collie_power_data = {
static struct resource collie_power_resource[] = {
{
.name = "ac",
.start = gpio_to_irq(COLLIE_GPIO_AC_IN),
.end = gpio_to_irq(COLLIE_GPIO_AC_IN),
.flags = IORESOURCE_IRQ |
IORESOURCE_IRQ_HIGHEDGE |
IORESOURCE_IRQ_LOWEDGE,
Expand Down Expand Up @@ -347,7 +345,8 @@ static void __init collie_init(void)

GPSR |= _COLLIE_GPIO_UCB1x00_RESET;


collie_power_resource[0].start = gpio_to_irq(COLLIE_GPIO_AC_IN);
collie_power_resource[0].end = gpio_to_irq(COLLIE_GPIO_AC_IN);
platform_scoop_config = &collie_pcmcia_config;

ret = platform_add_devices(devices, ARRAY_SIZE(devices));
Expand Down

0 comments on commit 5f76559

Please sign in to comment.