diff options
Diffstat (limited to 'drivers/mtd/nand/nand_bbt.c')
-rw-r--r-- | drivers/mtd/nand/nand_bbt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index ca286999fe08..32f063b6e9a5 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c | |||
@@ -60,7 +60,7 @@ | |||
60 | #include <linux/mtd/compatmac.h> | 60 | #include <linux/mtd/compatmac.h> |
61 | #include <linux/bitops.h> | 61 | #include <linux/bitops.h> |
62 | #include <linux/delay.h> | 62 | #include <linux/delay.h> |
63 | 63 | #include <linux/vmalloc.h> | |
64 | 64 | ||
65 | /** | 65 | /** |
66 | * check_pattern - [GENERIC] check if a pattern is in the buffer | 66 | * check_pattern - [GENERIC] check if a pattern is in the buffer |
@@ -873,7 +873,7 @@ int nand_scan_bbt (struct mtd_info *mtd, struct nand_bbt_descr *bd) | |||
873 | /* Allocate a temporary buffer for one eraseblock incl. oob */ | 873 | /* Allocate a temporary buffer for one eraseblock incl. oob */ |
874 | len = (1 << this->bbt_erase_shift); | 874 | len = (1 << this->bbt_erase_shift); |
875 | len += (len >> this->page_shift) * mtd->oobsize; | 875 | len += (len >> this->page_shift) * mtd->oobsize; |
876 | buf = kmalloc (len, GFP_KERNEL); | 876 | buf = vmalloc(len); |
877 | if (!buf) { | 877 | if (!buf) { |
878 | printk (KERN_ERR "nand_bbt: Out of memory\n"); | 878 | printk (KERN_ERR "nand_bbt: Out of memory\n"); |
879 | kfree (this->bbt); | 879 | kfree (this->bbt); |
@@ -897,7 +897,7 @@ int nand_scan_bbt (struct mtd_info *mtd, struct nand_bbt_descr *bd) | |||
897 | if (md) | 897 | if (md) |
898 | mark_bbt_region (mtd, md); | 898 | mark_bbt_region (mtd, md); |
899 | 899 | ||
900 | kfree (buf); | 900 | vfree (buf); |
901 | return res; | 901 | return res; |
902 | } | 902 | } |
903 | 903 | ||