summaryrefslogtreecommitdiffstats
path: root/include/linux/mtd
diff options
context:
space:
mode:
authorRichard Genoud2012-07-10 18:23:40 +0200
committerArtem Bityutskiy2012-09-04 08:38:58 +0200
commit62082e56cbb807cb325a8968f35dbd922432eb48 (patch)
tree7774c4a45743e1b7bbefb1c7363c9af3185a51c5 /include/linux/mtd
parentmtd: mark mtd_is_partition argument as constant (diff)
downloadkernel-qcow2-linux-62082e56cbb807cb325a8968f35dbd922432eb48.tar.gz
kernel-qcow2-linux-62082e56cbb807cb325a8968f35dbd922432eb48.tar.xz
kernel-qcow2-linux-62082e56cbb807cb325a8968f35dbd922432eb48.zip
mtd: mtdparts: introduce mtd_get_device_size
'mtd_get_device_size()' returns the size of the whole MTD device, that is the mtd_info master size. This will be used by UBI to calculate the maximum number of bad blocks (MBB) on a MTD device. Artem: amended the patch a bit. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/partitions.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h
index 02a51157a173..1f8d24bdafda 100644
--- a/include/linux/mtd/partitions.h
+++ b/include/linux/mtd/partitions.h
@@ -83,5 +83,6 @@ int mtd_is_partition(const struct mtd_info *mtd);
int mtd_add_partition(struct mtd_info *master, char *name,
long long offset, long long length);
int mtd_del_partition(struct mtd_info *master, int partno);
+uint64_t mtd_get_device_size(const struct mtd_info *mtd);
#endif