summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorBoris Brezillon2018-11-04 14:45:57 +0100
committerMiquel Raynal2019-04-08 10:21:10 +0200
commit509198485bf2600f4104fdf391b8632cf69f2dd8 (patch)
tree3539d23e464f097b8cfda1979fd935c299ec4eff /drivers/mtd
parentmtd: nand: Add a helper to retrieve the number of pages per target (diff)
downloadkernel-qcow2-linux-509198485bf2600f4104fdf391b8632cf69f2dd8.tar.gz
kernel-qcow2-linux-509198485bf2600f4104fdf391b8632cf69f2dd8.tar.xz
kernel-qcow2-linux-509198485bf2600f4104fdf391b8632cf69f2dd8.zip
mtd: spinand: Implement mtd->_max_bad_blocks
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>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/spi/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index fa54fe446b2d..4c15bb58c623 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -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);