summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/raw/sm_common.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@bootlin.com>2018-09-06 14:05:25 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2018-10-03 11:12:25 +0200
commitc17556f545c0283f53561c8a38d5cd4e91a35fe5 (patch)
treeeed87039a7acd636c119b02ce3f91a08688ad037 /drivers/mtd/nand/raw/sm_common.c
parent758b56f58b66bebc5bc2e0e180e1904aafa2b523 (diff)
downloadlinux-c17556f545c0283f53561c8a38d5cd4e91a35fe5.tar.bz2
mtd: rawnand: Pass a nand_chip object to chip->block_xxx() hooks
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 all chip->block_xxx() hooks at once. 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/sm_common.c')
-rw-r--r--drivers/mtd/nand/raw/sm_common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/nand/raw/sm_common.c b/drivers/mtd/nand/raw/sm_common.c
index 02ac6e9b2d16..bf143e0db787 100644
--- a/drivers/mtd/nand/raw/sm_common.c
+++ b/drivers/mtd/nand/raw/sm_common.c
@@ -99,8 +99,9 @@ static const struct mtd_ooblayout_ops oob_sm_small_ops = {
.free = oob_sm_small_ooblayout_free,
};
-static int sm_block_markbad(struct mtd_info *mtd, loff_t ofs)
+static int sm_block_markbad(struct nand_chip *chip, loff_t ofs)
{
+ struct mtd_info *mtd = nand_to_mtd(chip);
struct mtd_oob_ops ops;
struct sm_oob oob;
int ret;