]> git.dujemihanovic.xyz Git - u-boot.git/commit
mtd: Introduce mtd_block_isreserved()
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Wed, 21 May 2014 22:06:12 +0000 (19:06 -0300)
committerScott Wood <scottwood@freescale.com>
Wed, 26 Aug 2015 03:53:57 +0000 (22:53 -0500)
commit86a720aafce5b2571af66b8d7e04b144c05b1b8b
tree6b9b34f8e096ecb6df29466855d250e6e749b605
parent273310644f4aef806d84d5b8b70c45aa60e7caaf
mtd: Introduce mtd_block_isreserved()

In addition to mtd_block_isbad(), which checks if a block is bad or
reserved, it's needed to check if a block is reserved only (but not
bad). This commit adds an MTD interface for it, in a similar fashion to
mtd_block_isbad().

While here, fix mtd_block_isbad() so the out-of-bounds checking is done
before the callback check.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Tested-by: Pekon Gupta <pekon@ti.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
[scottwood: Cherry-picked from Linux 8471bb73ba10ed67]
Signed-off-by: Scott Wood <scottwood@freescale.com>
drivers/mtd/mtdcore.c
drivers/mtd/mtdpart.c
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_bbt.c
include/linux/mtd/mtd.h
include/linux/mtd/nand.h