]> git.karo-electronics.de Git - linux-beck.git/commitdiff
UBI: Fastmap: Wrap fastmap specific function in a ifdef
authorRichard Weinberger <richard@nod.at>
Mon, 6 Oct 2014 13:12:16 +0000 (15:12 +0200)
committerRichard Weinberger <richard@nod.at>
Thu, 26 Mar 2015 21:45:56 +0000 (22:45 +0100)
...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>
drivers/mtd/ubi/ubi.h

index bc13d14e02c4c9929a4a82785f58eb2f2575031a..3ea9480bd055740f456aef08bfb12d4e6f8e9fcd 100644 (file)
@@ -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