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 <kevin.smith@elecsyscorp.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Scott Wood <scottwood@freescale.com>
This commit is contained in:
Kevin Smith 2016-01-14 16:01:39 +00:00 committed by Scott Wood
parent 84caff35df
commit 065a373d93

View File

@ -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;