diff options
Diffstat (limited to 'init/initramfs.c')
-rw-r--r-- | init/initramfs.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/init/initramfs.c b/init/initramfs.c index 1db02a0025d..c0b1e0533d8 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -503,7 +503,6 @@ static int __init retain_initrd_param(char *str) __setup("retain_initrd", retain_initrd_param); extern char __initramfs_start[], __initramfs_end[]; -#ifdef CONFIG_BLK_DEV_INITRD #include <linux/initrd.h> #include <linux/kexec.h> @@ -539,15 +538,12 @@ skip: initrd_end = 0; } -#endif - -static int __init populate_rootfs(void) +int __init populate_rootfs(void) { char *err = unpack_to_rootfs(__initramfs_start, __initramfs_end - __initramfs_start, 0); if (err) panic(err); -#ifdef CONFIG_BLK_DEV_INITRD if (initrd_start) { #ifdef CONFIG_BLK_DEV_RAM int fd; @@ -579,7 +575,12 @@ static int __init populate_rootfs(void) free_initrd(); #endif } -#endif return 0; } +#ifndef CONFIG_ACPI_CUSTOM_DSDT_INITRD +/* + * if this option is enabled, populate_rootfs() is called _earlier_ in the + * boot sequence. This insures that the ACPI initialisation can find the file. + */ rootfs_initcall(populate_rootfs); +#endif |