summaryrefslogtreecommitdiff
path: root/drivers/mtd/devices
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-08-10 17:51:52 +0100
committerMark Brown <broonie@kernel.org>2018-08-10 17:51:52 +0100
commitc1acb21b32a3bb601453764c9eac9fc8fbb3a81d (patch)
tree015050d0c0df5ec3fa92068143f837ff97903072 /drivers/mtd/devices
parentc3c7126248a0750790ee33c4bd80a1847f55f5b6 (diff)
parent401c0d7712eb3189023efc9c0708a2ac984ed62e (diff)
Merge branch 'spi-4.19' into spi-next
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r--drivers/mtd/devices/m25p80.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index e84563d2067f..aac488008216 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -202,6 +202,9 @@ static int m25p_probe(struct spi_mem *spimem)
if (data && data->name)
nor->mtd.name = data->name;
+ if (!nor->mtd.name)
+ nor->mtd.name = spi_mem_get_name(spimem);
+
/* For some (historical?) reason many platforms provide two different
* names in flash_platform_data: "name" and "type". Quite often name is
* set to "m25p80" and then "type" provides a real chip name.