mtd: spinand: Implement mtd->_max_bad_blocks
authorBoris Brezillon <bbrezillon@kernel.org>
Sun, 4 Nov 2018 13:45:57 +0000 (14:45 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 8 Apr 2019 08:21:10 +0000 (10:21 +0200)
We just have to use nanddev_mtd_max_bad_blocks().

Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
drivers/mtd/nand/spi/core.c

index fa54fe446b2d3eaf1dce9241c0af05bf7f4c16cb..4c15bb58c6238f87f823276ec7b6399068edf8ba 100644 (file)
@@ -1037,6 +1037,7 @@ static int spinand_init(struct spinand_device *spinand)
        mtd->_block_markbad = spinand_mtd_block_markbad;
        mtd->_block_isreserved = spinand_mtd_block_isreserved;
        mtd->_erase = spinand_mtd_erase;
+       mtd->_max_bad_blocks = nanddev_mtd_max_bad_blocks;
 
        if (spinand->eccinfo.ooblayout)
                mtd_set_ooblayout(mtd, spinand->eccinfo.ooblayout);