Commit 9b210842 authored by Chris Packham's avatar Chris Packham Committed by Miquel Raynal
Browse files

mtd: maps: physmap: Retain mtd-name property from dts



In physmap_flash_of_init() the maps[].name can be populated based on the
optional 'linux,mtd-name' property in the dts. Make sure this is
retained when filling in the rest of the map[] data.

Signed-off-by: default avatarChris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200824025744.25992-1-chris.packham@alliedtelesis.co.nz
parent 1a64026e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -515,6 +515,7 @@ static int physmap_flash_probe(struct platform_device *dev)
		dev_notice(&dev->dev, "physmap platform flash device: %pR\n",
			   res);

		if (!info->maps[i].name)
			info->maps[i].name = dev_name(&dev->dev);

		if (!info->maps[i].phys)