Skip to content
Commit 2d283ede authored by Roger Quadros's avatar Roger Quadros Committed by Boris Brezillon
Browse files

mtd: nand: omap2: Fix partition creation via cmdline mtdparts

commit c9711ec5 ("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: c9711ec5

 ("mtd: nand: omap: Clean up device tree support")
Cc: <stable@vger.kernel.org> # 4.7+
Reported-by: default avatarLeto Enrico <enrico.leto@siemens.com>
Reported-by: default avatarAdam Ford <aford173@gmail.com>
Suggested-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Tested-by: default avatarAdam Ford <aford173@gmail.com>
Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
parent 038e8ad6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment