Add CONFIG_YAFFS_NO_YAFFS1 flag to remove yaffs1 code when not needed
authorCharles Manning <cdhmanning@gmail.com>
Thu, 9 Jul 2020 02:16:29 +0000 (14:16 +1200)
committerCharles Manning <cdhmanning@gmail.com>
Thu, 9 Jul 2020 02:16:29 +0000 (14:16 +1200)
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
yaffs_yaffs1.c

index 1dd4db9..e357347 100644 (file)
@@ -20,6 +20,9 @@
 
 int yaffs1_scan(struct yaffs_dev *dev)
 {
+#ifdef CONFIG_NO_YAFFS1
+       return YAFFS_FAIL;
+#else
        struct yaffs_ext_tags tags;
        u32 blk;
        int result;
@@ -420,4 +423,5 @@ int yaffs1_scan(struct yaffs_dev *dev)
        yaffs_trace(YAFFS_TRACE_SCAN, "yaffs1_scan ends");
 
        return YAFFS_OK;
+#endif
 }