generic: 5.15: rework pending patch
[openwrt/staging/pepe2k.git] / target / linux / generic / pending-5.15 / 492-try-auto-mounting-ubi0-rootfs-in-init-do_mounts.c.patch
index e3c4dd2ef48cb1a73e8db158fee1197cb8fff652..0efff2b52fbd49fdedab533d7e54263b0189053c 100644 (file)
@@ -48,6 +48,6 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 +      if (!mount_ubi_rootfs())
 +              return;
 +#endif
- #ifdef CONFIG_BLOCK
-       {
-               int err = create_dev("/dev/root", ROOT_DEV);
+       if (ROOT_DEV == 0 && root_device_name && root_fs_names) {
+               if (mount_nodev_root() == 0)
+                       return;