From: Kevin Smith Date: Thu, 14 Jan 2016 16:01:39 +0000 (+0000) Subject: mtd: pxa3xx_nand: Don't alloc unneeded memory X-Git-Tag: v2016.03-rc2~28 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=065a373d9318c83a493ca833d64881418449d429;p=u-boot 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 Cc: Stefan Roese Cc: Luka Perkov Cc: Scott Wood --- diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index a83f6c2eff..939274204e 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;