Commit b6f2f9e0 authored by David Woodhouse's avatar David Woodhouse

RedBoot flash partitioning: use vmalloc for buffer.

parent be3a6097
/*
* $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;
}
......
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