Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[sfrench/cifs-2.6.git] / drivers / mtd / onenand / omap2.c
index 710edee790b5868ae2b7542658dd25b1fe4fa8d2..96ecc1766fa80346ebf825b42ad8f5cff1cb13be 100644 (file)
@@ -149,7 +149,7 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state)
 
                INIT_COMPLETION(c->irq_done);
                if (c->gpio_irq) {
 
                INIT_COMPLETION(c->irq_done);
                if (c->gpio_irq) {
-                       result = omap_get_gpio_datain(c->gpio_irq);
+                       result = gpio_get_value(c->gpio_irq);
                        if (result == -1) {
                                ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
                                intr = read_reg(c, ONENAND_REG_INTERRUPT);
                        if (result == -1) {
                                ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
                                intr = read_reg(c, ONENAND_REG_INTERRUPT);
@@ -634,9 +634,9 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
                                "OneNAND\n", c->gpio_irq);
                        goto err_iounmap;
        }
                                "OneNAND\n", c->gpio_irq);
                        goto err_iounmap;
        }
-       omap_set_gpio_direction(c->gpio_irq, 1);
+       gpio_direction_input(c->gpio_irq);
 
 
-       if ((r = request_irq(OMAP_GPIO_IRQ(c->gpio_irq),
+       if ((r = request_irq(gpio_to_irq(c->gpio_irq),
                             omap2_onenand_interrupt, IRQF_TRIGGER_RISING,
                             pdev->dev.driver->name, c)) < 0)
                goto err_release_gpio;
                             omap2_onenand_interrupt, IRQF_TRIGGER_RISING,
                             pdev->dev.driver->name, c)) < 0)
                goto err_release_gpio;
@@ -723,7 +723,7 @@ err_release_dma:
        if (c->dma_channel != -1)
                omap_free_dma(c->dma_channel);
        if (c->gpio_irq)
        if (c->dma_channel != -1)
                omap_free_dma(c->dma_channel);
        if (c->gpio_irq)
-               free_irq(OMAP_GPIO_IRQ(c->gpio_irq), c);
+               free_irq(gpio_to_irq(c->gpio_irq), c);
 err_release_gpio:
        if (c->gpio_irq)
                omap_free_gpio(c->gpio_irq);
 err_release_gpio:
        if (c->gpio_irq)
                omap_free_gpio(c->gpio_irq);
@@ -760,7 +760,7 @@ static int __devexit omap2_onenand_remove(struct platform_device *pdev)
        omap2_onenand_shutdown(pdev);
        platform_set_drvdata(pdev, NULL);
        if (c->gpio_irq) {
        omap2_onenand_shutdown(pdev);
        platform_set_drvdata(pdev, NULL);
        if (c->gpio_irq) {
-               free_irq(OMAP_GPIO_IRQ(c->gpio_irq), c);
+               free_irq(gpio_to_irq(c->gpio_irq), c);
                omap_free_gpio(c->gpio_irq);
        }
        iounmap(c->onenand.base);
                omap_free_gpio(c->gpio_irq);
        }
        iounmap(c->onenand.base);