diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2014-09-29 05:47:54 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2014-10-17 12:29:21 -0400 |
commit | 70f3ce0510afdad7cbaf27ab7ab961377205c782 (patch) | |
tree | 29df1a4e2259f90e0d2a1d35a7c8484688dc6253 /drivers/mtd/devices/m25p80.c | |
parent | 90e55b3812a1245bb674afcc4410ddba7db402f6 (diff) |
mtd: spi-nor: make spi_nor_scan() take a chip type name, not spi_device_id
Drivers currently call spi_nor_match_id() and then spi_nor_scan().
This adds a dependency on struct spi_device_id which we want to
avoid. Make spi_nor_scan() do it for them.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/devices/m25p80.c')
-rw-r--r-- | drivers/mtd/devices/m25p80.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 822209d10689..bd5e4c6edfd4 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c | |||
@@ -193,7 +193,6 @@ static int m25p_probe(struct spi_device *spi) | |||
193 | { | 193 | { |
194 | struct mtd_part_parser_data ppdata; | 194 | struct mtd_part_parser_data ppdata; |
195 | struct flash_platform_data *data; | 195 | struct flash_platform_data *data; |
196 | const struct spi_device_id *id = NULL; | ||
197 | struct m25p *flash; | 196 | struct m25p *flash; |
198 | struct spi_nor *nor; | 197 | struct spi_nor *nor; |
199 | enum read_mode mode = SPI_NOR_NORMAL; | 198 | enum read_mode mode = SPI_NOR_NORMAL; |
@@ -241,8 +240,7 @@ static int m25p_probe(struct spi_device *spi) | |||
241 | else | 240 | else |
242 | flash_name = spi->modalias; | 241 | flash_name = spi->modalias; |
243 | 242 | ||
244 | id = spi_nor_match_id(flash_name); | 243 | ret = spi_nor_scan(nor, flash_name, mode); |
245 | ret = spi_nor_scan(nor, id, mode); | ||
246 | if (ret) | 244 | if (ret) |
247 | return ret; | 245 | return ret; |
248 | 246 | ||