mtd: add an mtd method for get_len_incl_bad()
authorBen Gardiner <bengardiner@nanometrics.ca>
Tue, 31 Aug 2010 21:48:01 +0000 (17:48 -0400)
committerScott Wood <scottwood@freescale.com>
Mon, 11 Oct 2010 20:11:00 +0000 (15:11 -0500)
commit4ba692fb1e413db974037238370b8402c8a60750
tree055ea79276b8429c8653a85589052ffdd6e80d36
parent0a026d3e86f3981f6fc4f6d634708442f65873e5
mtd: add an mtd method for get_len_incl_bad()

The logic to 'spread' mtd partitions needs to calculate the length in
the mtd device, including bad blocks.

This patch introduces a new function, mtd_get_len_incl_bad that can
return both the length including bad blocks and whether that length
was truncated on the device. This new function will be used by the
mtdparts spread command later in this series. The definition of the
function is #ifdef'd out in configurations that do not use the new
'mtdparts spread' command.

Signed-off-by: Ben Gardiner<bengardiner@nanometrics.ca>
CC: Scott Wood <scottwood@freescale.com>
drivers/mtd/mtdcore.c
include/linux/mtd/mtd.h