]> git.karo-electronics.de Git - karo-tx-uboot.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)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 08:34:43 +0000 (10:34 +0200)
commitb09944c1087104f05030e5d7b52a1aabd6f23550
treea3c399df2482ead8412e003952af93523976d4cd
parent96975c9ce7089ea46ba13167d5fa7311a4fd08ef
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