summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/raw/r852.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@bootlin.com>2018-09-06 15:05:27 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2018-10-03 12:12:25 +0300
commit50a487e7719caa07e951dfcfd983b2c5517e2f76 (patch)
treec54dad4e68655702645663658e56c2b7e6d9f488 /drivers/mtd/nand/raw/r852.c
parent0f808c1602bc75c74399989d47842197118f7e72 (diff)
downloadlinux-50a487e7719caa07e951dfcfd983b2c5517e2f76.tar.xz
mtd: rawnand: Pass a nand_chip object to chip->dev_ready()
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->dev_ready() hook. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand/raw/r852.c')
-rw-r--r--drivers/mtd/nand/raw/r852.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/raw/r852.c b/drivers/mtd/nand/raw/r852.c
index e90549e031a7..4331ff856fa5 100644
--- a/drivers/mtd/nand/raw/r852.c
+++ b/drivers/mtd/nand/raw/r852.c
@@ -373,7 +373,7 @@ static int r852_wait(struct mtd_info *mtd, struct nand_chip *chip)
msecs_to_jiffies(400) : msecs_to_jiffies(20));
while (time_before(jiffies, timeout))
- if (chip->dev_ready(mtd))
+ if (chip->dev_ready(chip))
break;
nand_status_op(chip, &status);
@@ -390,9 +390,9 @@ static int r852_wait(struct mtd_info *mtd, struct nand_chip *chip)
* Check if card is ready
*/
-static int r852_ready(struct mtd_info *mtd)
+static int r852_ready(struct nand_chip *chip)
{
- struct r852_device *dev = r852_get_dev(mtd);
+ struct r852_device *dev = r852_get_dev(nand_to_mtd(chip));
return !(r852_read_reg(dev, R852_CARD_STA) & R852_CARD_STA_BUSY);
}