1 --- a/drivers/mtd/spi-nor/spi-nor.c
2 +++ b/drivers/mtd/spi-nor/spi-nor.c
3 @@ -915,7 +915,6 @@ int spi_nor_scan(struct spi_nor *nor, co
6 struct flash_info *info;
7 - struct flash_platform_data *data;
8 struct device *dev = nor->dev;
9 struct mtd_info *mtd = nor->mtd;
10 struct device_node *np = dev->of_node;
11 @@ -926,28 +925,6 @@ int spi_nor_scan(struct spi_nor *nor, co
15 - /* Platform data helps sort out which chip type we have, as
16 - * well as how this board partitions it. If we don't have
17 - * a chip ID, try the JEDEC id commands; they'll work for most
18 - * newer chips, even if we don't recognize the particular chip.
20 - data = dev_get_platdata(dev);
21 - if (data && data->type) {
22 - const struct spi_device_id *plat_id;
24 - for (i = 0; i < ARRAY_SIZE(spi_nor_ids) - 1; i++) {
25 - plat_id = &spi_nor_ids[i];
26 - if (strcmp(data->type, plat_id->name))
31 - if (i < ARRAY_SIZE(spi_nor_ids) - 1)
34 - dev_warn(dev, "unrecognized id %s\n", data->type);
37 info = (void *)id->driver_data;
40 @@ -985,11 +962,8 @@ int spi_nor_scan(struct spi_nor *nor, co
44 - if (data && data->name)
45 - mtd->name = data->name;
48 mtd->name = dev_name(dev);
50 mtd->type = MTD_NORFLASH;
52 mtd->flags = MTD_CAP_NORFLASH;