[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 6 Jun 2008 18:04:51 +0200
From: Haavard Skinnemoen <haavard.skinnemoen@...el.com>
To: linux-mtd@...ts.infradead.org, kernel@...32linux.org
Cc: Andrew Victor <avictor.za@...il.com>,
Nicolas Ferre <nicolas.ferre@...el.com>,
Patrice VILCHEZ <patrice.vilchez@...el.com>,
linux-kernel@...r.kernel.org,
Haavard Skinnemoen <haavard.skinnemoen@...el.com>
Subject: [PATCH 1/8] at91_nand: Convert to generic GPIO API
No point in using an AT91-specific GPIO API when the generic API works
just as well.
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@...el.com>
---
drivers/mtd/nand/at91_nand.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/mtd/nand/at91_nand.c b/drivers/mtd/nand/at91_nand.c
index 0adb287..2dcaeea 100644
--- a/drivers/mtd/nand/at91_nand.c
+++ b/drivers/mtd/nand/at91_nand.c
@@ -31,12 +31,10 @@
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
+#include <asm/gpio.h>
#include <asm/io.h>
-#include <asm/sizes.h>
-#include <asm/hardware.h>
#include <asm/arch/board.h>
-#include <asm/arch/gpio.h>
#ifdef CONFIG_MTD_NAND_AT91_ECC_HW
#define hard_ecc 1
@@ -99,7 +97,7 @@ struct at91_nand_host {
static void at91_nand_enable(struct at91_nand_host *host)
{
if (host->board->enable_pin)
- at91_set_gpio_value(host->board->enable_pin, 0);
+ gpio_set_value(host->board->enable_pin, 0);
}
/*
@@ -108,7 +106,7 @@ static void at91_nand_enable(struct at91_nand_host *host)
static void at91_nand_disable(struct at91_nand_host *host)
{
if (host->board->enable_pin)
- at91_set_gpio_value(host->board->enable_pin, 1);
+ gpio_set_value(host->board->enable_pin, 1);
}
/*
@@ -142,7 +140,7 @@ static int at91_nand_device_ready(struct mtd_info *mtd)
struct nand_chip *nand_chip = mtd->priv;
struct at91_nand_host *host = nand_chip->priv;
- return at91_get_gpio_value(host->board->rdy_pin);
+ return gpio_get_value(host->board->rdy_pin);
}
/*
@@ -447,7 +445,7 @@ static int __init at91_nand_probe(struct platform_device *pdev)
at91_nand_enable(host);
if (host->board->det_pin) {
- if (at91_get_gpio_value(host->board->det_pin)) {
+ if (gpio_get_value(host->board->det_pin)) {
printk ("No SmartMedia card inserted.\n");
res = ENXIO;
goto out;
--
1.5.5.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists