diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2004-08-10 18:58:29 +0100 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2004-08-10 18:58:29 +0100 |
commit | b6f2f9e0f461fdd033fe20e51fc6018caf0a3938 (patch) | |
tree | 197cad2930c5859e895483ca8898750d9281765f /drivers | |
parent | be3a60978fdb757ff8fab31b8c43a09a156b092c (diff) | |
download | history-b6f2f9e0f461fdd033fe20e51fc6018caf0a3938.tar.gz |
RedBoot flash partitioning: use vmalloc for buffer.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/redboot.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mtd/redboot.c b/drivers/mtd/redboot.c index 626ad368ecc2d5..0212a7df84c4d2 100644 --- a/drivers/mtd/redboot.c +++ b/drivers/mtd/redboot.c @@ -1,5 +1,5 @@ /* - * $Id: redboot.c,v 1.13 2004/04/01 10:17:40 gthomas Exp $ + * $Id: redboot.c,v 1.15 2004/08/10 07:55:16 dwmw2 Exp $ * * Parse RedBoot-style Flash Image System (FIS) tables and * produce a Linux partition array to match. @@ -8,6 +8,7 @@ #include <linux/kernel.h> #include <linux/slab.h> #include <linux/init.h> +#include <linux/vmalloc.h> #include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h> @@ -53,7 +54,7 @@ static int parse_redboot_partitions(struct mtd_info *master, static char nullstring[] = "unallocated"; #endif - buf = kmalloc(master->erasesize, GFP_KERNEL); + buf = vmalloc(master->erasesize); if (!buf) return -ENOMEM; @@ -190,7 +191,7 @@ static int parse_redboot_partitions(struct mtd_info *master, fl = fl->next; kfree(old); } - kfree(buf); + vfree(buf); return ret; } |