summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0001.c3
-rw-r--r--drivers/mtd/chips/cfi_probe.c3
-rw-r--r--drivers/mtd/chips/jedec_probe.c3
-rw-r--r--drivers/mtd/ftl.c3
-rw-r--r--drivers/mtd/mtdconcat.c3
-rw-r--r--drivers/mtd/parsers/bcm47xxpart.c3
-rw-r--r--drivers/mtd/parsers/parser_trx.c3
-rw-r--r--drivers/mtd/parsers/scpart.c3
-rw-r--r--drivers/mtd/rfd_ftl.c3
-rw-r--r--drivers/mtd/sm_ftl.c3
-rw-r--r--drivers/mtd/ubi/eba.c6
11 files changed, 12 insertions, 24 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index e2e21d66eba5..7e0e7b4fded9 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -779,8 +779,7 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
newcfi = kmalloc_flex(*newcfi, chips, numvirtchips);
if (!newcfi)
return -ENOMEM;
- shared = kmalloc_objs(struct flchip_shared, cfi->numchips,
- GFP_KERNEL);
+ shared = kmalloc_objs(struct flchip_shared, cfi->numchips);
if (!shared) {
kfree(newcfi);
return -ENOMEM;
diff --git a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c
index 926bf7b61e59..bdc04a6ec9c7 100644
--- a/drivers/mtd/chips/cfi_probe.c
+++ b/drivers/mtd/chips/cfi_probe.c
@@ -208,8 +208,7 @@ static int __xipram cfi_chip_setup(struct map_info *map,
if (!num_erase_regions)
return 0;
- cfi->cfiq = kmalloc_flex(*cfi->cfiq, EraseRegionInfo, num_erase_regions,
- GFP_KERNEL);
+ cfi->cfiq = kmalloc_flex(*cfi->cfiq, EraseRegionInfo, num_erase_regions);
if (!cfi->cfiq)
return 0;
diff --git a/drivers/mtd/chips/jedec_probe.c b/drivers/mtd/chips/jedec_probe.c
index d7acf0425e4f..a49ef682dc13 100644
--- a/drivers/mtd/chips/jedec_probe.c
+++ b/drivers/mtd/chips/jedec_probe.c
@@ -1985,8 +1985,7 @@ static int cfi_jedec_setup(struct map_info *map, struct cfi_private *cfi, int in
num_erase_regions = jedec_table[index].nr_regions;
- cfi->cfiq = kmalloc_flex(*cfi->cfiq, EraseRegionInfo, num_erase_regions,
- GFP_KERNEL);
+ cfi->cfiq = kmalloc_flex(*cfi->cfiq, EraseRegionInfo, num_erase_regions);
if (!cfi->cfiq) {
//xx printk(KERN_WARNING "%s: kmalloc failed for CFI ident structure\n", map->name);
return 0;
diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c
index 9b8d40d7aa37..fc9185d44d92 100644
--- a/drivers/mtd/ftl.c
+++ b/drivers/mtd/ftl.c
@@ -207,8 +207,7 @@ static int build_maps(partition_t *part)
for (i = 0; i < part->DataUnits; i++)
part->EUNInfo[i].Offset = 0xffffffff;
part->XferInfo =
- kmalloc_objs(struct xfer_info_t, part->header.NumTransferUnits,
- GFP_KERNEL);
+ kmalloc_objs(struct xfer_info_t, part->header.NumTransferUnits);
if (!part->XferInfo)
goto out_EUNInfo;
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index 4ea98e398b30..9eb5d919d9ba 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -823,8 +823,7 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c
concat->mtd.erasesize = max_erasesize;
concat->mtd.numeraseregions = num_erase_region;
concat->mtd.eraseregions = erase_region_p =
- kmalloc_objs(struct mtd_erase_region_info, num_erase_region,
- GFP_KERNEL);
+ kmalloc_objs(struct mtd_erase_region_info, num_erase_region);
if (!erase_region_p) {
kfree(concat);
printk
diff --git a/drivers/mtd/parsers/bcm47xxpart.c b/drivers/mtd/parsers/bcm47xxpart.c
index b8ba7d2f22e1..a412c0e7bd4e 100644
--- a/drivers/mtd/parsers/bcm47xxpart.c
+++ b/drivers/mtd/parsers/bcm47xxpart.c
@@ -106,8 +106,7 @@ static int bcm47xxpart_parse(struct mtd_info *master,
blocksize = 0x1000;
/* Alloc */
- parts = kzalloc_objs(struct mtd_partition, BCM47XXPART_MAX_PARTS,
- GFP_KERNEL);
+ parts = kzalloc_objs(struct mtd_partition, BCM47XXPART_MAX_PARTS);
if (!parts)
return -ENOMEM;
diff --git a/drivers/mtd/parsers/parser_trx.c b/drivers/mtd/parsers/parser_trx.c
index cfd9ab8caff5..cf3bc9735238 100644
--- a/drivers/mtd/parsers/parser_trx.c
+++ b/drivers/mtd/parsers/parser_trx.c
@@ -65,8 +65,7 @@ static int parser_trx_parse(struct mtd_info *mtd,
if (err != 0 && err != -EINVAL)
pr_err("failed to parse \"brcm,trx-magic\" DT attribute, using default: %d\n", err);
- parts = kzalloc_objs(struct mtd_partition, TRX_PARSER_MAX_PARTS,
- GFP_KERNEL);
+ parts = kzalloc_objs(struct mtd_partition, TRX_PARSER_MAX_PARTS);
if (!parts)
return -ENOMEM;
diff --git a/drivers/mtd/parsers/scpart.c b/drivers/mtd/parsers/scpart.c
index 87432dc99265..ad6e9d5c3daa 100644
--- a/drivers/mtd/parsers/scpart.c
+++ b/drivers/mtd/parsers/scpart.c
@@ -171,8 +171,7 @@ static int scpart_parse(struct mtd_info *master,
goto free;
}
- parts = kzalloc_objs(*parts, of_get_child_count(ofpart_node),
- GFP_KERNEL);
+ parts = kzalloc_objs(*parts, of_get_child_count(ofpart_node));
if (!parts) {
res = -ENOMEM;
goto free;
diff --git a/drivers/mtd/rfd_ftl.c b/drivers/mtd/rfd_ftl.c
index 3199453b3bc9..9f7efdab6e90 100644
--- a/drivers/mtd/rfd_ftl.c
+++ b/drivers/mtd/rfd_ftl.c
@@ -185,8 +185,7 @@ static int scan_header(struct partition *part)
if (!part->header_cache)
goto err;
- part->blocks = kzalloc_objs(struct block, part->total_blocks,
- GFP_KERNEL);
+ part->blocks = kzalloc_objs(struct block, part->total_blocks);
if (!part->blocks)
goto err;
diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c
index 512012fd39f8..c8032755f9a4 100644
--- a/drivers/mtd/sm_ftl.c
+++ b/drivers/mtd/sm_ftl.c
@@ -78,8 +78,7 @@ static struct attribute_group *sm_create_sysfs_attributes(struct sm_ftl *ftl)
/* Create array of pointers to the attributes */
- attributes = kzalloc_objs(struct attribute *, NUM_ATTRIBUTES + 1,
- GFP_KERNEL);
+ attributes = kzalloc_objs(struct attribute *, NUM_ATTRIBUTES + 1);
if (!attributes)
goto error3;
attributes[0] = &vendor_attribute->dev_attr.attr;
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 35e047392d4a..f0c549e62c55 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -1550,15 +1550,13 @@ int self_check_eba(struct ubi_device *ubi, struct ubi_attach_info *ai_fastmap,
if (!vol)
continue;
- scan_eba[i] = kmalloc_objs(**scan_eba, vol->reserved_pebs,
- GFP_KERNEL);
+ scan_eba[i] = kmalloc_objs(**scan_eba, vol->reserved_pebs);
if (!scan_eba[i]) {
ret = -ENOMEM;
goto out_free;
}
- fm_eba[i] = kmalloc_objs(**fm_eba, vol->reserved_pebs,
- GFP_KERNEL);
+ fm_eba[i] = kmalloc_objs(**fm_eba, vol->reserved_pebs);
if (!fm_eba[i]) {
ret = -ENOMEM;
kfree(scan_eba[i]);