diff options
-rw-r--r-- | drivers/mtd/devices/m25p80.c | 3 |
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) | |||
202 | if (data && data->name) | 202 | if (data && data->name) |
203 | nor->mtd.name = data->name; | 203 | nor->mtd.name = data->name; |
204 | 204 | ||
205 | if (!nor->mtd.name) | ||
206 | nor->mtd.name = spi_mem_get_name(spimem); | ||
207 | |||
205 | /* For some (historical?) reason many platforms provide two different | 208 | /* For some (historical?) reason many platforms provide two different |
206 | * names in flash_platform_data: "name" and "type". Quite often name is | 209 | * names in flash_platform_data: "name" and "type". Quite often name is |
207 | * set to "m25p80" and then "type" provides a real chip name. | 210 | * set to "m25p80" and then "type" provides a real chip name. |