mtd: rawnand: Use nanddev_mtd_max_bad_blocks()
authorBoris Brezillon <bbrezillon@kernel.org>
Sun, 4 Nov 2018 13:50:28 +0000 (14:50 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 8 Apr 2019 08:21:14 +0000 (10:21 +0200)
commit7beb37e5f0d29d7d23aec0e47900ff4dfa8c2e55
tree952eaed59e5a42382a905bd1f0c7d65d69a121c7
parentd974541e23791e189c5faa0462223d29352cecc6
mtd: rawnand: Use nanddev_mtd_max_bad_blocks()

nanddev_mtd_max_bad_blocks() is implemented by the generic NAND layer
and is already doing what we need. Reuse this function instead of
having our own implementation.

While at it, get rid of the ->max_bb_per_die and ->blocks_per_die
fields which are now unused.

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/raw/nand_base.c
drivers/mtd/nand/raw/nand_onfi.c
include/linux/mtd/rawnand.h