mtd: nand-gpio: Use default dev_ready function if RDY is missing in configuration
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Mon Aug 5 16:59:02 EDT 2013
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=c85d32d56859bb01f775e12771150dc47a7b03ba
Commit: c85d32d56859bb01f775e12771150dc47a7b03ba
Parent: 283df420fc3bf9294149fdc9173709feafde4222
Author: Alexander Shiyan <shc_work at mail.ru>
AuthorDate: Mon May 6 17:53:49 2013 +0400
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Mon Aug 5 20:45:05 2013 +0100
mtd: nand-gpio: Use default dev_ready function if RDY is missing in configuration
Signed-off-by: Alexander Shiyan <shc_work at mail.ru>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/nand/gpio.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/mtd/nand/gpio.c b/drivers/mtd/nand/gpio.c
index c35f46e..8f102d1 100644
--- a/drivers/mtd/nand/gpio.c
+++ b/drivers/mtd/nand/gpio.c
@@ -136,10 +136,7 @@ static int gpio_nand_devready(struct mtd_info *mtd)
{
struct gpiomtd *gpiomtd = gpio_nand_getpriv(mtd);
- if (gpio_is_valid(gpiomtd->plat.gpio_rdy))
- return gpio_get_value(gpiomtd->plat.gpio_rdy);
-
- return 1;
+ return gpio_get_value(gpiomtd->plat.gpio_rdy);
}
#ifdef CONFIG_OF
@@ -307,6 +304,7 @@ static int gpio_nand_probe(struct platform_device *dev)
if (ret)
return ret;
gpio_direction_input(gpiomtd->plat.gpio_rdy);
+ this->dev_ready = gpio_nand_devready;
}
this->IO_ADDR_W = this->IO_ADDR_R;
@@ -316,7 +314,6 @@ static int gpio_nand_probe(struct platform_device *dev)
/* install our routines */
this->cmd_ctrl = gpio_nand_cmd_ctrl;
- this->dev_ready = gpio_nand_devready;
if (this->options & NAND_BUSWIDTH_16) {
this->read_buf = gpio_nand_readbuf16;
More information about the linux-mtd-cvs
mailing list