* [PATCH] mtd: maps: physmap: Retain mtd-name property from dts
@ 2020-08-24 2:57 ` Chris Packham
0 siblings, 0 replies; 4+ messages in thread
From: Chris Packham @ 2020-08-24 2:57 UTC (permalink / raw)
To: miquel.raynal, richard
Cc: linux-mtd, linux-kernel, Chris Packham, Vignesh Raghavendra
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>
---
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;
--
2.28.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] mtd: maps: physmap: Retain mtd-name property from dts
@ 2020-08-24 2:57 ` Chris Packham
0 siblings, 0 replies; 4+ messages in thread
From: Chris Packham @ 2020-08-24 2:57 UTC (permalink / raw)
To: miquel.raynal, richard
Cc: Chris Packham, linux-mtd, linux-kernel, Vignesh Raghavendra
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>
---
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;
--
2.28.0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mtd: maps: physmap: Retain mtd-name property from dts
2020-08-24 2:57 ` Chris Packham
@ 2020-09-07 7:34 ` Miquel Raynal
-1 siblings, 0 replies; 4+ messages in thread
From: Miquel Raynal @ 2020-09-07 7:34 UTC (permalink / raw)
To: Chris Packham, miquel.raynal, richard
Cc: linux-mtd, linux-kernel, Vignesh Raghavendra
On Mon, 2020-08-24 at 02:57:44 UTC, Chris Packham wrote:
> 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>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mtd: maps: physmap: Retain mtd-name property from dts
@ 2020-09-07 7:34 ` Miquel Raynal
0 siblings, 0 replies; 4+ messages in thread
From: Miquel Raynal @ 2020-09-07 7:34 UTC (permalink / raw)
To: Chris Packham, miquel.raynal, richard
Cc: linux-mtd, linux-kernel, Vignesh Raghavendra
On Mon, 2020-08-24 at 02:57:44 UTC, Chris Packham wrote:
> 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>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-09-07 7:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24 2:57 [PATCH] mtd: maps: physmap: Retain mtd-name property from dts Chris Packham
2020-08-24 2:57 ` Chris Packham
2020-09-07 7:34 ` Miquel Raynal
2020-09-07 7:34 ` Miquel Raynal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.