diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-03-23 16:36:45 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-03-31 16:03:16 -0400 |
commit | 39429c5e4a2c56a39c9a1c9bdad54431c63104b0 (patch) | |
tree | 06abc2a4ff8d323b0358b768a71c7b651c3229f3 /arch/blackfin | |
parent | 2f99c36986ff27a86f06f27212c5f5fa8c7164a3 (diff) |
new helper: ext2_image_size()
... implemented that way since the next commit will leave it
almost alone in ext2_fs.h - most of the file (including
struct ext2_super_block) is going to move to fs/ext2/ext2.h.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/kernel/setup.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 2aa019368504..2ad747e909fb 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -550,6 +550,7 @@ static __init void memory_setup(void) | |||
550 | { | 550 | { |
551 | #ifdef CONFIG_MTD_UCLINUX | 551 | #ifdef CONFIG_MTD_UCLINUX |
552 | unsigned long mtd_phys = 0; | 552 | unsigned long mtd_phys = 0; |
553 | unsigned long n; | ||
553 | #endif | 554 | #endif |
554 | unsigned long max_mem; | 555 | unsigned long max_mem; |
555 | 556 | ||
@@ -593,9 +594,9 @@ static __init void memory_setup(void) | |||
593 | mtd_size = PAGE_ALIGN(*((unsigned long *)(mtd_phys + 8))); | 594 | mtd_size = PAGE_ALIGN(*((unsigned long *)(mtd_phys + 8))); |
594 | 595 | ||
595 | # if defined(CONFIG_EXT2_FS) || defined(CONFIG_EXT3_FS) | 596 | # if defined(CONFIG_EXT2_FS) || defined(CONFIG_EXT3_FS) |
596 | if (*((unsigned short *)(mtd_phys + 0x438)) == EXT2_SUPER_MAGIC) | 597 | n = ext2_image_size((void *)(mtd_phys + 0x400)); |
597 | mtd_size = | 598 | if (n) |
598 | PAGE_ALIGN(*((unsigned long *)(mtd_phys + 0x404)) << 10); | 599 | mtd_size = PAGE_ALIGN(n * 1024); |
599 | # endif | 600 | # endif |
600 | 601 | ||
601 | # if defined(CONFIG_CRAMFS) | 602 | # if defined(CONFIG_CRAMFS) |