linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: m25p80.c: Use positive logic to check JEDEC id
@ 2014-01-21  7:56 Axel Lin
  2014-02-11 18:39 ` Brian Norris
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2014-01-21  7:56 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris; +Cc: linux-mtd

For slightly better readability.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/mtd/devices/m25p80.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index d0f6475..3f7955f 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -1061,9 +1061,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);
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: m25p80.c: Use positive logic to check JEDEC id
  2014-01-21  7:56 [PATCH] mtd: m25p80.c: Use positive logic to check JEDEC id Axel Lin
@ 2014-02-11 18:39 ` Brian Norris
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Norris @ 2014-02-11 18:39 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-mtd, David Woodhouse

On Tue, Jan 21, 2014 at 03:56:34PM +0800, Axel Lin wrote:
> For slightly better readability.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Pushed to l2-mtd.git. Thanks.

Brian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-11 18:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-21  7:56 [PATCH] mtd: m25p80.c: Use positive logic to check JEDEC id Axel Lin
2014-02-11 18:39 ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).