kernel: Fix compile warning
[openwrt/openwrt.git] / target / linux / generic / pending-5.4 / 492-try-auto-mounting-ubi0-rootfs-in-init-do_mounts.c.patch
index aa61f4ae8d0de11da7ca8629b5409a3ca1a3ae8f..e207c0d00dbb4fe9b71e68fc121c6db164062d81 100644 (file)
@@ -8,12 +8,13 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 
 --- a/init/do_mounts.c
 +++ b/init/do_mounts.c
-@@ -460,7 +460,28 @@ retry:
+@@ -460,7 +460,30 @@ retry:
  out:
        put_page(page);
  }
 - 
 +
++#ifdef CONFIG_MTD_ROOTFS_ROOT_DEV
 +static int __init mount_ubi_rootfs(void)
 +{
 +      int flags = MS_SILENT;
@@ -34,11 +35,12 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 +
 +      return -EINVAL;
 +}
++#endif
 +
  #ifdef CONFIG_ROOT_NFS
  
  #define NFSROOT_TIMEOUT_MIN   5
-@@ -554,6 +575,10 @@ void __init mount_root(void)
+@@ -554,6 +577,10 @@ void __init mount_root(void)
                        change_floppy("root floppy");
        }
  #endif