Move the internals read_super() functions near the declaration of
they corresponding fs_type declaration so that their compilation are properly co
nditionalized.
diff --git a/fs/yaffs2/yaffs_fs.c b/fs/yaffs2/yaffs_fs.c
--- a/fs/yaffs2/yaffs_fs.c
+++ b/fs/yaffs2/yaffs_fs.c
@@ -1617,29 +1617,15 @@ static struct super_block *yaffs_interna
}
-static int yaffs_internal_read_super_ram(struct super_block * sb, void * data, int silent)
-{
- return yaffs_internal_read_super(1,1,sb,data,silent) ? 0 : -1;
-}
+
+#ifdef CONFIG_YAFFS_MTD_ENABLED
+//#if defined(CONFIG_KERNEL_2_5)
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
static int yaffs_internal_read_super_mtd(struct super_block * sb, void * data, int silent)
{
return yaffs_internal_read_super(1,0,sb,data,silent) ? 0 : -1;
}
-static int yaffs2_internal_read_super_ram(struct super_block * sb, void * data, int silent)
-{
- return yaffs_internal_read_super(2,1,sb,data,silent) ? 0 : -1;
-}
-static int yaffs2_internal_read_super_mtd(struct super_block * sb, void * data, int silent)
-{
- return yaffs_internal_read_super(2,0,sb,data,silent) ? 0 : -1;
-}
-
-
-
-#ifdef CONFIG_YAFFS_MTD_ENABLED
-//#if defined(CONFIG_KERNEL_2_5)
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
static struct super_block *yaffs_read_super(struct file_system_type * fs, int flags, const char *dev_name, void *data)
{
@@ -1670,6 +1656,11 @@ static DECLARE_FSTYPE(yaffs_fs_type, "ya
#ifdef CONFIG_YAFFS2_MTD_ENABLED
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
+static int yaffs2_internal_read_super_mtd(struct super_block * sb, void * data, int silent)
+{
+ return yaffs_internal_read_super(2,0,sb,data,silent) ? 0 : -1;
+}
+
static struct super_block *yaffs2_read_super(struct file_system_type * fs, int flags, const char *dev_name, void *data)
{
@@ -1701,6 +1692,11 @@ static DECLARE_FSTYPE(yaffs2_fs_type, "y
#ifdef CONFIG_YAFFS_RAM_ENABLED
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
+static int yaffs_internal_read_super_ram(struct super_block * sb, void * data, int silent)
+{
+ return yaffs_internal_read_super(1,1,sb,data,silent) ? 0 : -1;
+}
+
static struct super_block *yaffs_ram_read_super(struct file_system_type * fs, int flags, const char *dev_name, void *data)
{
@@ -1729,6 +1725,11 @@ static DECLARE_FSTYPE(yaffs_ram_fs_type,
#ifdef CONFIG_YAFFS2_RAM_ENABLED
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
+static int yaffs2_internal_read_super_ram(struct super_block * sb, void * data, int silent)
+{
+ return yaffs_internal_read_super(2,1,sb,data,silent) ? 0 : -1;
+}
+
static struct super_block *yaffs2_ram_read_super(struct file_system_type * fs, int flags, const char *dev_name, void *data)
{