diff options
author | Axel Lin <axel.lin@ingics.com> | 2014-01-21 07:56:34 (GMT) |
---|---|---|
committer | Matthew Weigel <Matthew.Weigel@freescale.com> | 2014-12-11 18:37:22 (GMT) |
commit | df1f423971610148f586b809314201d732e3cda7 (patch) | |
tree | 06f8fc50f537bb33c2dde54705188ac710be6b1c /drivers/mtd | |
parent | 4bbbc2a90ab30fd3d078b18da93a2a28ad19e868 (diff) | |
download | linux-fsl-qoriq-df1f423971610148f586b809314201d732e3cda7.tar.xz |
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>
(cherry picked from commit b2fda1296bb8e213a6bad3937326ae98c4c4773c)
Change-Id: Ifadc84eb60ed11bf59c47691cfe58b6a5ecb2274
Reviewed-on: http://git.am.freescale.net:8181/20050
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Diffstat (limited to 'drivers/mtd')
-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 1e147a8..c6e6d8e 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); |