diff options
author | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-09-06 14:05:25 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2018-10-03 11:12:25 +0200 |
commit | c17556f545c0283f53561c8a38d5cd4e91a35fe5 (patch) | |
tree | eed87039a7acd636c119b02ce3f91a08688ad037 /drivers/mtd/nand/raw/sm_common.c | |
parent | mtd: rawnand: Pass a nand_chip object to chip->select_chip() (diff) | |
download | linux-c17556f545c0283f53561c8a38d5cd4e91a35fe5.tar.xz linux-c17556f545c0283f53561c8a38d5cd4e91a35fe5.zip |
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.c | 3 |
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; |