From: Mike Frysinger <vapier@gentoo.org>
To: David Woodhouse <David.Woodhouse@intel.com>,
Chen Gong <g.chen@freescale.com>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH] m25p80: fix detection of SPI parts
Date: Wed, 29 Oct 2008 09:21:07 -0400 [thread overview]
Message-ID: <1225286467-17955-1-git-send-email-vapier@gentoo.org> (raw)
Commit d0e8c47c58575b9131e786edb488fd029eba443e added support for extended
ids but in the process managed to break detection of all flashes. The ext
jedec id check was inserted into an if statement that lacked braces, and
it did not add the required braces. As such, the detection routine always
returns the first entry in the SPI flash list.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
drivers/mtd/devices/m25p80.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 76a7675..a298fed 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -574,10 +574,11 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi)
for (tmp = 0, info = m25p_data;
tmp < ARRAY_SIZE(m25p_data);
tmp++, info++) {
- if (info->jedec_id == jedec)
+ if (info->jedec_id == jedec) {
if (ext_jedec != 0 && info->ext_id != ext_jedec)
continue;
return info;
+ }
}
dev_err(&spi->dev, "unrecognized JEDEC id %06x\n", jedec);
return NULL;
--
1.6.0.2
next reply other threads:[~2008-10-29 13:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 13:21 Mike Frysinger [this message]
2008-10-30 19:59 ` [PATCH] m25p80: fix detection of m25p16 flashes Mike Frysinger
2008-11-03 21:37 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1225286467-17955-1-git-send-email-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=David.Woodhouse@intel.com \
--cc=g.chen@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®