Commit 90e55b38 authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Brian Norris

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: default avatarRafał Miłecki <zajec5@gmail.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 8b3d58e5
...@@ -197,6 +197,7 @@ static int m25p_probe(struct spi_device *spi) ...@@ -197,6 +197,7 @@ static int m25p_probe(struct spi_device *spi)
struct m25p *flash; struct m25p *flash;
struct spi_nor *nor; struct spi_nor *nor;
enum read_mode mode = SPI_NOR_NORMAL; enum read_mode mode = SPI_NOR_NORMAL;
char *flash_name = NULL;
int ret; int ret;
data = dev_get_platdata(&spi->dev); data = dev_get_platdata(&spi->dev);
...@@ -236,12 +237,11 @@ static int m25p_probe(struct spi_device *spi) ...@@ -236,12 +237,11 @@ static int m25p_probe(struct spi_device *spi)
* If that's the case, respect "type" and ignore a "name". * If that's the case, respect "type" and ignore a "name".
*/ */
if (data && data->type) if (data && data->type)
id = spi_nor_match_id(data->type); flash_name = data->type;
else
/* If we didn't get name from platform, simply use "modalias". */ flash_name = spi->modalias;
if (!id)
id = spi_get_device_id(spi);
id = spi_nor_match_id(flash_name);
ret = spi_nor_scan(nor, id, mode); ret = spi_nor_scan(nor, id, mode);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment