diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2014-09-29 09:47:53 (GMT) |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2014-10-17 16:29:21 (GMT) |
commit | 90e55b3812a1245bb674afcc4410ddba7db402f6 (patch) | |
tree | 26772a58e6a3ec7eee857a90504acfa2cf5f6e45 /drivers | |
parent | 8b3d58e554453ab858bbb169d93b7321bdc628d4 (diff) | |
download | linux-90e55b3812a1245bb674afcc4410ddba7db402f6.tar.xz |
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')
-rw-r--r-- | drivers/mtd/devices/m25p80.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index dcda628..822209d 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) struct m25p *flash; struct spi_nor *nor; enum read_mode mode = SPI_NOR_NORMAL; + char *flash_name = NULL; int ret; data = dev_get_platdata(&spi->dev); @@ -236,12 +237,11 @@ static int m25p_probe(struct spi_device *spi) * If that's the case, respect "type" and ignore a "name". */ if (data && data->type) - id = spi_nor_match_id(data->type); - - /* If we didn't get name from platform, simply use "modalias". */ - if (!id) - id = spi_get_device_id(spi); + flash_name = data->type; + else + flash_name = spi->modalias; + id = spi_nor_match_id(flash_name); ret = spi_nor_scan(nor, id, mode); if (ret) return ret; |