]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap1/board-h2.c
ARM: OMAP: Switch to gpio_request/free calls (OMAP and mainline)
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap1 / board-h2.c
index af44566a105930e038674fee246fa9c580e4938f..d53cefd6bcca4894316ee0c2eeb13b31c36253e9 100644 (file)
@@ -428,7 +428,7 @@ static struct platform_device *h2_devices[] __initdata = {
 
 static void __init h2_init_smc91x(void)
 {
-       if ((omap_request_gpio(0)) < 0) {
+       if (gpio_request(0, "SMC91x irq") < 0) {
                printk("Error requesting gpio 0 for smc91x irq\n");
                return;
        }
@@ -519,8 +519,9 @@ static void __init h2_init(void)
 
        h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS;
        h2_nand_resource.end += SZ_4K - 1;
-       if (!(omap_request_gpio(H2_NAND_RB_GPIO_PIN)))
-               h2_nand_data.dev_ready = h2_nand_dev_ready;
+       if (gpio_request(H2_NAND_RB_GPIO_PIN, "NAND ready") < 0)
+               BUG();
+       gpio_direction_input(H2_NAND_RB_GPIO_PIN);
 
        omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
        omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
@@ -532,10 +533,10 @@ static void __init h2_init(void)
        /* Irda */
 #if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE)
        omap_writel(omap_readl(FUNC_MUX_CTRL_A) | 7, FUNC_MUX_CTRL_A);
-       if (!(omap_request_gpio(H2_IRDA_FIRSEL_GPIO_PIN))) {
-               gpio_direction_output(H2_IRDA_FIRSEL_GPIO_PIN, 0);
-               h2_irda_data.transceiver_mode = h2_transceiver_mode;
-       }
+       if (gpio_request(H2_IRDA_FIRSEL_GPIO_PIN, "IRDA mode") < 0)
+               BUG();
+       gpio_direction_output(H2_IRDA_FIRSEL_GPIO_PIN, 0);
+       h2_irda_data.transceiver_mode = h2_transceiver_mode;
 #endif
 
        platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices));