]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/plat-omap/debug-devices.c
ARM: OMAP: Switch to gpio_request/free calls (OMAP and mainline)
[linux-2.6-omap-h63xx.git] / arch / arm / plat-omap / debug-devices.c
index 5b73bb274452b9b55b4567082bbd16a208044033..f6684832ca8f6cb500812d8d72f9575aa517ea97 100644 (file)
@@ -12,9 +12,9 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <mach/board.h>
 #include <mach/gpio.h>
@@ -69,15 +69,15 @@ int __init debug_card_init(u32 addr, unsigned gpio)
        smc91x_resources[0].start = addr + 0x300;
        smc91x_resources[0].end   = addr + 0x30f;
 
-       smc91x_resources[1].start = OMAP_GPIO_IRQ(gpio);
-       smc91x_resources[1].end   = OMAP_GPIO_IRQ(gpio);
+       smc91x_resources[1].start = gpio_to_irq(gpio);
+       smc91x_resources[1].end   = gpio_to_irq(gpio);
 
-       status = omap_request_gpio(gpio);
+       status = gpio_request(gpio, "SMC91x irq");
        if (status < 0) {
                printk(KERN_ERR "GPIO%d unavailable for smc91x IRQ\n", gpio);
                return status;
        }
-       omap_set_gpio_direction(gpio, 1);
+       gpio_direction_input(gpio);
 
        led_resources[0].start = addr;
        led_resources[0].end   = addr + SZ_4K - 1;