Merge branch 'fixes-gpio-to-irq' into fixes
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-omap1 / board-htcherald.c
index 827d83a96af83a8510a9e680fbb3ad802b22e2ad..60c06ee23855d018198698dbd74110611447d8e6 100644 (file)
@@ -324,8 +324,6 @@ static struct platform_device gpio_leds_device = {
 
 static struct resource htcpld_resources[] = {
        [0] = {
-               .start  = OMAP_GPIO_IRQ(HTCHERALD_GIRQ_BTNS),
-               .end    = OMAP_GPIO_IRQ(HTCHERALD_GIRQ_BTNS),
                .flags  = IORESOURCE_IRQ,
        },
 };
@@ -450,7 +448,6 @@ static struct spi_board_info __initdata htcherald_spi_board_info[] = {
        {
                .modalias               = "ads7846",
                .platform_data          = &htcherald_ts_platform_data,
-               .irq                    = OMAP_GPIO_IRQ(HTCHERALD_GPIO_TS),
                .max_speed_hz           = 2500000,
                .bus_num                = 2,
                .chip_select            = 1,
@@ -576,6 +573,8 @@ static void __init htcherald_init(void)
        printk(KERN_INFO "HTC Herald init.\n");
 
        /* Do board initialization before we register all the devices */
+       htcpld_resources[0].start = gpio_to_irq(HTCHERALD_GIRQ_BTNS);
+       htcpld_resources[0].end = gpio_to_irq(HTCHERALD_GIRQ_BTNS);
        platform_add_devices(devices, ARRAY_SIZE(devices));
 
        htcherald_disable_watchdog();
@@ -583,6 +582,7 @@ static void __init htcherald_init(void)
        htcherald_usb_enable();
        omap1_usb_init(&htcherald_usb_config);
 
+       htcherald_spi_board_info[0].irq = gpio_to_irq(HTCHERALD_GPIO_TS);
        spi_register_board_info(htcherald_spi_board_info,
                ARRAY_SIZE(htcherald_spi_board_info));