* [PATCH] mtd: physmap: Fix mtd device name
@ 2020-03-19 14:38 Victor Fusco
2020-04-27 13:19 ` Miquel Raynal
0 siblings, 1 reply; 2+ messages in thread
From: Victor Fusco @ 2020-03-19 14:38 UTC (permalink / raw)
To: linux-mtd; +Cc: Victor Fusco
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 <victor@cartesi.io>
---
drivers/mtd/maps/physmap-core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/maps/physmap-core.c b/drivers/mtd/maps/physmap-core.c
index 8f7f966fa9a7..6372197ad865 100644
--- a/drivers/mtd/maps/physmap-core.c
+++ b/drivers/mtd/maps/physmap-core.c
@@ -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
--
2.17.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd: physmap: Fix mtd device name
2020-03-19 14:38 [PATCH] mtd: physmap: Fix mtd device name Victor Fusco
@ 2020-04-27 13:19 ` Miquel Raynal
0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2020-04-27 13:19 UTC (permalink / raw)
To: Victor Fusco; +Cc: Richard Weinberger, 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 <victor@cartesi.io> wrote on Thu, 19 Mar
2020 14:38:33 +0000:
> 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 <victor@cartesi.io>
> ---
> drivers/mtd/maps/physmap-core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/maps/physmap-core.c b/drivers/mtd/maps/physmap-core.c
> index 8f7f966fa9a7..6372197ad865 100644
> --- a/drivers/mtd/maps/physmap-core.c
> +++ b/drivers/mtd/maps/physmap-core.c
> @@ -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;
>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-27 13:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-19 14:38 [PATCH] mtd: physmap: Fix mtd device name Victor Fusco
2020-04-27 13:19 ` Miquel Raynal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).