summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2014-09-29 05:47:53 -0400
committerBrian Norris <computersforpeace@gmail.com>2014-10-17 12:29:21 -0400
commit90e55b3812a1245bb674afcc4410ddba7db402f6 (patch)
tree26772a58e6a3ec7eee857a90504acfa2cf5f6e45 /drivers/mtd
parent8b3d58e554453ab858bbb169d93b7321bdc628d4 (diff)
mtd: m25p80: get rid of spi_get_device_id
This simplifies the way we use spi_nor framework and will allow us to drop spi_nor_match_id. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/devices/m25p80.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index dcda6287228d..822209d10689 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -197,6 +197,7 @@ static int m25p_probe(struct spi_device *spi)
197 struct m25p *flash; 197 struct m25p *flash;
198 struct spi_nor *nor; 198 struct spi_nor *nor;
199 enum read_mode mode = SPI_NOR_NORMAL; 199 enum read_mode mode = SPI_NOR_NORMAL;
200 char *flash_name = NULL;
200 int ret; 201 int ret;
201 202
202 data = dev_get_platdata(&spi->dev); 203 data = dev_get_platdata(&spi->dev);
@@ -236,12 +237,11 @@ static int m25p_probe(struct spi_device *spi)
236 * If that's the case, respect "type" and ignore a "name". 237 * If that's the case, respect "type" and ignore a "name".
237 */ 238 */
238 if (data && data->type) 239 if (data && data->type)
239 id = spi_nor_match_id(data->type); 240 flash_name = data->type;
240 241 else
241 /* If we didn't get name from platform, simply use "modalias". */ 242 flash_name = spi->modalias;
242 if (!id)
243 id = spi_get_device_id(spi);
244 243
244 id = spi_nor_match_id(flash_name);
245 ret = spi_nor_scan(nor, id, mode); 245 ret = spi_nor_scan(nor, id, mode);
246 if (ret) 246 if (ret)
247 return ret; 247 return ret;