kernel: Fix compile warning
[openwrt/staging/mkresin.git] / target / linux / generic / pending-5.10 / 492-try-auto-mounting-ubi0-rootfs-in-init-do_mounts.c.patch
index af65cbfa59e2e6c10073b54eea518eea6407f044..e3c4dd2ef48cb1a73e8db158fee1197cb8fff652 100644 (file)
@@ -8,12 +8,13 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 
 --- a/init/do_mounts.c
 +++ b/init/do_mounts.c
-@@ -474,7 +474,28 @@ retry:
+@@ -474,7 +474,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
-@@ -567,6 +588,10 @@ void __init mount_root(void)
+@@ -567,6 +590,10 @@ void __init mount_root(void)
                return;
        }
  #endif