Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8aabdf37 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Boris Brezillon
Browse files

mtd: nand: denali: allow to override mtd->name from label DT property



Commit 28309572 ("mtd: name the mtd device with an optional
label property") allow us to identify a chip in a user-friendly way.

If nand_set_flash_node() picks up the "label" from DT, let's respect
it.  Otherwise, let it fallback to the current name "denali-nand".

Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Suggested-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
parent 07604686
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1462,8 +1462,10 @@ int denali_init(struct denali_nand_info *denali)

	/* now that our ISR is registered, we can enable interrupts */
	denali_set_intr_modes(denali, true);
	mtd->name = "denali-nand";
	nand_set_flash_node(chip, denali->dev->of_node);
	/* Fallback to the default name if DT did not give "label" property */
	if (!mtd->name)
		mtd->name = "denali-nand";

	/* register the driver with the NAND core subsystem */
	chip->select_chip = denali_select_chip;