summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKevin Smith <[email protected]>2016-01-14 16:01:39 +0000
committerScott Wood <[email protected]>2016-02-12 17:13:50 -0600
commit065a373d9318c83a493ca833d64881418449d429 (patch)
tree430a3eb436ce5d322b9ad9211c9f57ad33011b56 /drivers
parent84caff35df0a399051171e4a05c6cbcadd919b64 (diff)
mtd: pxa3xx_nand: Don't alloc unneeded memory
The allocation size is reduced from what was introduced from the Linux kernel, as U-boot uses the statically allocated nand_info instead of needing to dynamically allocate an mtd_info instance. Signed-off-by: Kevin Smith <[email protected]> Cc: Stefan Roese <[email protected]> Cc: Luka Perkov <[email protected]> Cc: Scott Wood <[email protected]>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/pxa3xx_nand.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index a83f6c2eff0..939274204e1 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -1600,9 +1600,9 @@ void board_nand_init(void)
struct pxa3xx_nand_host *host;
int ret;
- info = kzalloc(sizeof(*info) + (sizeof(struct mtd_info) +
- sizeof(*host)) *
- CONFIG_SYS_MAX_NAND_DEVICE, GFP_KERNEL);
+ info = kzalloc(sizeof(*info) +
+ sizeof(*host) * CONFIG_SYS_MAX_NAND_DEVICE,
+ GFP_KERNEL);
if (!info)
return;