mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 07:04:24 +00:00
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: Chris Packham <chris.packham@alliedtelesis.co.nz> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20200824025744.25992-1-chris.packham@alliedtelesis.co.nz
This commit is contained in:
parent
1a64026eda
commit
9b2108429c
1 changed files with 2 additions and 1 deletions
|
@ -515,7 +515,8 @@ static int physmap_flash_probe(struct platform_device *dev)
|
|||
dev_notice(&dev->dev, "physmap platform flash device: %pR\n",
|
||||
res);
|
||||
|
||||
info->maps[i].name = dev_name(&dev->dev);
|
||||
if (!info->maps[i].name)
|
||||
info->maps[i].name = dev_name(&dev->dev);
|
||||
|
||||
if (!info->maps[i].phys)
|
||||
info->maps[i].phys = res->start;
|
||||
|
|
Loading…
Reference in a new issue