[MTD] m25p80.c extended jedec support (v2)

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Oct 14 06:59:01 EDT 2008


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=daa847356a4f2b2722d78b389ec4f172f24fecd5
Commit:     daa847356a4f2b2722d78b389ec4f172f24fecd5
Parent:     69fd3a8d098faf41a04930afa83757c0555ee360
Author:     Chen Gong <g.chen at freescale.com>
AuthorDate: Tue Sep 16 14:14:12 2008 +0800
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Tue Oct 14 10:59:43 2008 +0100

    [MTD] m25p80.c extended jedec support (v2)
    
    Include missing parts of previous patch.
    
    Signed-off-by: Chen Gong <g.chen at freescale.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/devices/m25p80.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 4d3ae08..697a3a2 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -548,7 +548,7 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi)
 {
 	int			tmp;
 	u8			code = OPCODE_RDID;
-	u8			id[3];
+	u8			id[5];
 	u32			jedec;
 	u16                     ext_jedec;
 	struct flash_info	*info;
@@ -557,7 +557,7 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi)
 	 * string for after vendor-specific data, after the three bytes
 	 * we use here.  Supporting some chips might require using it.
 	 */
-	tmp = spi_write_then_read(spi, &code, 1, id, 3);
+	tmp = spi_write_then_read(spi, &code, 1, id, 5);
 	if (tmp < 0) {
 		DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n",
 			spi->dev.bus_id, tmp);



More information about the linux-mtd-cvs mailing list