mtd: nand-gpio: Use default dev_ready function if RDY is missing in configuration
Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
283df420fc
commit
c85d32d568
|
@ -136,10 +136,7 @@ static int gpio_nand_devready(struct mtd_info *mtd)
|
||||||
{
|
{
|
||||||
struct gpiomtd *gpiomtd = gpio_nand_getpriv(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 gpio_get_value(gpiomtd->plat.gpio_rdy);
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_OF
|
#ifdef CONFIG_OF
|
||||||
|
@ -307,6 +304,7 @@ static int gpio_nand_probe(struct platform_device *dev)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
gpio_direction_input(gpiomtd->plat.gpio_rdy);
|
gpio_direction_input(gpiomtd->plat.gpio_rdy);
|
||||||
|
this->dev_ready = gpio_nand_devready;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->IO_ADDR_W = this->IO_ADDR_R;
|
this->IO_ADDR_W = this->IO_ADDR_R;
|
||||||
|
@ -316,7 +314,6 @@ static int gpio_nand_probe(struct platform_device *dev)
|
||||||
|
|
||||||
/* install our routines */
|
/* install our routines */
|
||||||
this->cmd_ctrl = gpio_nand_cmd_ctrl;
|
this->cmd_ctrl = gpio_nand_cmd_ctrl;
|
||||||
this->dev_ready = gpio_nand_devready;
|
|
||||||
|
|
||||||
if (this->options & NAND_BUSWIDTH_16) {
|
if (this->options & NAND_BUSWIDTH_16) {
|
||||||
this->read_buf = gpio_nand_readbuf16;
|
this->read_buf = gpio_nand_readbuf16;
|
||||||
|
|
Loading…
Reference in New Issue