root_device_name has gone through many iterations, but is now solely
used for removing a /dev/ prefix off root= parameter. It's time for it
to be removed.

Signed-off-by: Alex Xu (Hello71) <alex_y...@yahoo.ca>
---
 init/do_mounts.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/init/do_mounts.c b/init/do_mounts.c
index a2a273b9866f..544614279281 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -29,7 +29,6 @@
 #include "do_mounts.h"
 
 int root_mountflags = MS_RDONLY | MS_SILENT;
-static char * __initdata root_device_name;
 static char __initdata saved_root_name[64];
 static int root_wait;
 
@@ -449,7 +448,7 @@ void __init mount_block_root(char *name, int flags)
                 * and give them a list of the available devices
                 */
                printk("VFS: Cannot open root device \"%s\" or %s: error %d\n",
-                               root_device_name, b, err);
+                               saved_root_name, b, err);
                printk("Please append a correct \"root=\" boot option; here are 
the available partitions:\n");
 
                printk_all_partitions();
@@ -602,10 +601,7 @@ void __init prepare_namespace(void)
        md_run_setup();
 
        if (saved_root_name[0]) {
-               root_device_name = saved_root_name;
-               ROOT_DEV = name_to_dev_t(root_device_name);
-               if (strncmp(root_device_name, "/dev/", 5) == 0)
-                       root_device_name += 5;
+               ROOT_DEV = name_to_dev_t(saved_root_name);
        }
 
        if (initrd_load())
-- 
2.29.2

Reply via email to