From: Richard Weinberger Date: Mon, 6 Oct 2014 13:12:16 +0000 (+0200) Subject: UBI: Fastmap: Wrap fastmap specific function in a ifdef X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=5e0246e332349751d39d186ea0b7ec1e371ab2f8;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.git 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 Reviewed-by: Tanya Brokhman --- 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