]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: nand: omap2: Fix partition creation via cmdline mtdparts
authorRoger Quadros <rogerq@ti.com>
Thu, 30 Mar 2017 07:37:50 +0000 (10:37 +0300)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 25 Apr 2017 12:18:40 +0000 (14:18 +0200)
commitf1a1e2da704dee96faf41e0bf11742ed79188a32
tree11555ffe46bfbf2b55d56b9e796ca1e028b86f9c
parent09e6b8ede40efa7215278a9081b67b3d13c56344
mtd: nand: omap2: Fix partition creation via cmdline mtdparts

commit bef31afe077a ("mtd: nand: omap: Clean up device tree support")
caused the parent device name to be changed from "omap2-nand.0"
to "<base address>.nand"  (e.g. 30000000.nand on omap3 platforms).
This caused mtd->name to be changed as well. This breaks partition
creation via mtdparts passed by u-boot as it uses "omap2-nand.0"
for the mtd-id.

Fix this by explicitly setting the mtd->name to "omap2-nand.<CS number>"
if it isn't already set by nand_set_flash_node(). CS number is the
NAND controller instance ID.

Fixes: bef31afe077a ("mtd: nand: omap: Clean up device tree support")
Cc: <stable@vger.kernel.org> # 4.7+
Reported-by: Leto Enrico <enrico.leto@siemens.com>
Reported-by: Adam Ford <aford173@gmail.com>
Suggested-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Tested-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/omap2.c