Commit b25b7819 authored by Robert P. J. Day's avatar Robert P. J. Day Committed by Linus Torvalds

Remove superfluous checks for CONFIG_BLK_DEV_INITRD from initramfs.c

Given that init/Makefile includes initramfs.c in the build only if
CONFIG_BLK_DEV_INITRD is defined, there seems to be no point checking for
it yet again.
Signed-off-by: default avatarRobert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d99c4f6b
...@@ -503,7 +503,6 @@ static int __init retain_initrd_param(char *str) ...@@ -503,7 +503,6 @@ static int __init retain_initrd_param(char *str)
__setup("retain_initrd", retain_initrd_param); __setup("retain_initrd", retain_initrd_param);
extern char __initramfs_start[], __initramfs_end[]; extern char __initramfs_start[], __initramfs_end[];
#ifdef CONFIG_BLK_DEV_INITRD
#include <linux/initrd.h> #include <linux/initrd.h>
#include <linux/kexec.h> #include <linux/kexec.h>
...@@ -539,15 +538,12 @@ static void __init free_initrd(void) ...@@ -539,15 +538,12 @@ static void __init free_initrd(void)
initrd_end = 0; initrd_end = 0;
} }
#endif
static int __init populate_rootfs(void) static int __init populate_rootfs(void)
{ {
char *err = unpack_to_rootfs(__initramfs_start, char *err = unpack_to_rootfs(__initramfs_start,
__initramfs_end - __initramfs_start, 0); __initramfs_end - __initramfs_start, 0);
if (err) if (err)
panic(err); panic(err);
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start) { if (initrd_start) {
#ifdef CONFIG_BLK_DEV_RAM #ifdef CONFIG_BLK_DEV_RAM
int fd; int fd;
...@@ -579,7 +575,6 @@ static int __init populate_rootfs(void) ...@@ -579,7 +575,6 @@ static int __init populate_rootfs(void)
free_initrd(); free_initrd();
#endif #endif
} }
#endif
return 0; return 0;
} }
rootfs_initcall(populate_rootfs); rootfs_initcall(populate_rootfs);
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