summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/ubi.h
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2014-10-06 15:12:16 +0200
committerRichard Weinberger <richard@nod.at>2015-03-26 22:45:56 +0100
commit5e0246e332349751d39d186ea0b7ec1e371ab2f8 (patch)
tree399063d57e7c30fb22845e913354cdb80de69899 /drivers/mtd/ubi/ubi.h
parent943b33564e78130014ca91b575181becc828179e (diff)
downloadblackbird-op-linux-5e0246e332349751d39d186ea0b7ec1e371ab2f8.tar.gz
blackbird-op-linux-5e0246e332349751d39d186ea0b7ec1e371ab2f8.zip
UBI: Fastmap: Wrap fastmap specific function in a ifdef
...such that we can implement NOP variants of some functions. This will help to reduce fastmap specific ifdefs in other c files. Signed-off-by: Richard Weinberger <richard@nod.at> Reviewed-by: Tanya Brokhman <tlinder@codeaurora.org>
Diffstat (limited to 'drivers/mtd/ubi/ubi.h')
-rw-r--r--drivers/mtd/ubi/ubi.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index bc13d14e02c4..3ea9480bd055 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -871,10 +871,14 @@ int ubi_compare_lebs(struct ubi_device *ubi, const struct ubi_ainf_peb *aeb,
int pnum, const struct ubi_vid_hdr *vid_hdr);
/* fastmap.c */
+#ifdef CONFIG_MTD_UBI_FASTMAP
size_t ubi_calc_fm_size(struct ubi_device *ubi);
int ubi_update_fastmap(struct ubi_device *ubi);
int ubi_scan_fastmap(struct ubi_device *ubi, struct ubi_attach_info *ai,
int fm_anchor);
+#else
+static inline int ubi_update_fastmap(struct ubi_device *ubi) { return 0; }
+#endif
/* block.c */
#ifdef CONFIG_MTD_UBI_BLOCK
OpenPOWER on IntegriCloud