Commit 1a471f37 authored by Kai Germaschewski's avatar Kai Germaschewski

do_mounts: initrd_load() is never called w/o CONFIG_BLK_DEV_INITRD

When CONFIG_BLK_DEV_INITRD is not set, mount_initrd will always be
0, so initrd_load() won't be called. However, we need a stub to make
the compiler happy.
parent bbacce2d
...@@ -687,14 +687,16 @@ static void __init handle_initrd(void) ...@@ -687,14 +687,16 @@ static void __init handle_initrd(void)
#endif #endif
} }
#ifdef CONFIG_BLK_DEV_INITRD
static int __init initrd_load(void) static int __init initrd_load(void)
{ {
#ifdef CONFIG_BLK_DEV_INITRD
create_dev("/dev/ram", MKDEV(RAMDISK_MAJOR, 0), NULL); create_dev("/dev/ram", MKDEV(RAMDISK_MAJOR, 0), NULL);
create_dev("/dev/initrd", MKDEV(RAMDISK_MAJOR, INITRD_MINOR), NULL); create_dev("/dev/initrd", MKDEV(RAMDISK_MAJOR, INITRD_MINOR), NULL);
#endif
return rd_load_image("/dev/initrd"); return rd_load_image("/dev/initrd");
} }
#else
static inline int initrd_load(void) { return 0; }
#endif
/* /*
* Prepare the namespace - decide what/where to mount, load ramdisks, etc. * Prepare the namespace - decide what/where to mount, load ramdisks, etc.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment