1 --- a/drivers/mtd/spi-nor/spi-nor.c
2 +++ b/drivers/mtd/spi-nor/spi-nor.c
3 @@ -926,29 +926,23 @@ int spi_nor_scan(struct spi_nor *nor, co
7 - info = (void *)id->driver_data;
9 - if (info->jedec_id) {
10 - const struct spi_device_id *jid;
12 - jid = nor->read_id(nor);
14 - return PTR_ERR(jid);
15 - } else if (jid != id) {
17 - * JEDEC knows better, so overwrite platform ID. We
18 - * can't trust partitions any longer, but we'll let
19 - * mtd apply them anyway, since some partitions may be
20 - * marked read-only, and we don't want to lose that
21 - * information, even if it's not 100% accurate.
23 - dev_warn(dev, "found %s, expected %s\n",
24 - jid->name, id->name);
26 - info = (void *)jid->driver_data;
28 + info = (void *)id->driver_data;
29 + if (info->jedec_id) {
31 + "passed SPI device ID (%s) contains JEDEC, ignoring it, driver should be fixed!\n",
38 + id = nor->read_id(nor);
42 + info = (void *)id->driver_data;
44 mutex_init(&nor->lock);