X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=init%2Finitramfs.c;h=c0b1e0533d80d32080c8d44acf2ab9f9d90bcbb7;hb=58dc3232ff77158460f79e3c1932b81e8a2a0194;hp=00eff7a110854d5706ff51205f5ef06a7a267d27;hpb=93bbad8fe13a25dcf7f3bc628a71d1a7642ae61b;p=linux-2.6-omap-h63xx.git diff --git a/init/initramfs.c b/init/initramfs.c index 00eff7a1108..c0b1e0533d8 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -133,7 +133,7 @@ static __initdata loff_t this_header, next_header; static __initdata int dry_run; -static inline void eat(unsigned n) +static inline void __init eat(unsigned n) { victim += n; this_header += n; @@ -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 #include @@ -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