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>
This commit is contained in:
Ben Hutchings
2014-09-29 11:47:54 +02:00
committed by Brian Norris
부모 90e55b3812
커밋 70f3ce0510
4개의 변경된 파일14개의 추가작업 그리고 30개의 파일을 삭제

파일 보기

@@ -193,7 +193,6 @@ static int m25p_probe(struct spi_device *spi)
{
struct mtd_part_parser_data ppdata;
struct flash_platform_data *data;
const struct spi_device_id *id = NULL;
struct m25p *flash;
struct spi_nor *nor;
enum read_mode mode = SPI_NOR_NORMAL;
@@ -241,8 +240,7 @@ static int m25p_probe(struct spi_device *spi)
else
flash_name = spi->modalias;
id = spi_nor_match_id(flash_name);
ret = spi_nor_scan(nor, id, mode);
ret = spi_nor_scan(nor, flash_name, mode);
if (ret)
return ret;