]> git.neil.brown.name Git - history.git/commitdiff
RedBoot flash partitioning: use vmalloc for buffer.
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>
Tue, 10 Aug 2004 17:58:29 +0000 (18:58 +0100)
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>
Tue, 10 Aug 2004 17:58:29 +0000 (18:58 +0100)
drivers/mtd/redboot.c

index 626ad368ecc2d5dc68a7b9c367d65fd61a00c931..0212a7df84c4d2f091100590bd87a411804e7a76 100644 (file)
@@ -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;
 }