mtd: physmap: Fix mtd device name
PATCH 1/1 mtd: physmap: Fix mtd device name
This patch fixes the mtd device name when the "linux,mtd-name" field is defined on the Device Tree. A verification to check if the name was already defined was missing causing the name to be overwritten with a default value.
--- drivers/mtd/maps/physmap-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mtd/maps/physmap-core.c +2 -1
@@ -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;
base-commit: 5076190daded2197f62fe92cf69674488be44175
Signature · 6 lines
2.17.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Hi Victor,
Please add the maintainers in copy of your patch next time. Otherwise you might wait a lot before we even figure that you sent us something.
Victor Fusco <[email protected]> wrote on Thu, 19 Mar 2020 14:38:33 +0000:
Quoted 16 lines
This patch fixes the mtd device name when the "linux,mtd-name" field is defined on the Device Tree. A verification to check if the name was already defined was missing causing the name to be overwritten with a default value.
Signed-off-by Victor Fusco <[email protected]>--- drivers/mtd/maps/physmap-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/mtd/maps/physmap-core.c +0
-0
drivers/mtd/maps/physmap-core.c static int physmap_flash_probe(struct platform_device *dev) · line 522
Quoted 9 lines
drivers/mtd/maps/physmap-core.c +2
-1@@ -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;
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/