diff options
author | Axel Lin <axel.lin@ingics.com> | 2014-01-21 15:56:34 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2015-09-17 08:57:43 -0500 |
commit | 5a4ef4533900e1379cd84ef5c4e3aaf3ff0540dc (patch) | |
tree | fb179e650aae785e3b9a15280179e39f822ab095 /drivers/mtd/devices/m25p80.c | |
parent | 2f5e2ebeef4afa2491d78762e57b66f3f36100bb (diff) |
mtd: m25p80: Use positive logic to check JEDEC ID
For slightly better readability.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
Diffstat (limited to 'drivers/mtd/devices/m25p80.c')
-rw-r--r-- | drivers/mtd/devices/m25p80.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 1e147a849c35..c6e6d8e8ef7b 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -1078,9 +1078,8 @@ static const struct spi_device_id *jedec_probe(struct spi_device *spi) for (tmp = 0; tmp < ARRAY_SIZE(m25p_ids) - 1; tmp++) { info = (void *)m25p_ids[tmp].driver_data; if (info->jedec_id == jedec) { - if (info->ext_id != 0 && info->ext_id != ext_jedec) - continue; - return &m25p_ids[tmp]; + if (info->ext_id == 0 || info->ext_id == ext_jedec) + return &m25p_ids[tmp]; } } dev_err(&spi->dev, "unrecognized JEDEC id %06x\n", jedec); |