]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
mtd: m25p80: Use positive logic to check JEDEC ID
authorAxel Lin <axel.lin@ingics.com>
Tue, 21 Jan 2014 07:56:34 +0000 (15:56 +0800)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 11 Mar 2014 05:42:23 +0000 (22:42 -0700)
For slightly better readability.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/devices/m25p80.c

index 1e147a849c35a015eba9fd3de9e2778f0b87407e..c6e6d8e8ef7b6ff7dce4e2775b80a5a6e15e6629 100644 (file)
@@ -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);