mtd: m25p80: Reinstate error print on unrecognized flash

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Dec 3 11:59:01 EST 2010


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=f0dff9bd00d2cffea160fb3fa015b77607458634
Commit:     f0dff9bd00d2cffea160fb3fa015b77607458634
Parent:     b7b6e08f9265db56129931983fc6c06d62c9f4f9
Author:     Kevin Cernekee <cernekee at gmail.com>
AuthorDate: Sat Oct 30 21:11:02 2010 -0700
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Dec 3 16:26:08 2010 +0000

    mtd: m25p80: Reinstate error print on unrecognized flash
    
    Commit b34bc037b26e621e5fc13466767e4da110a7b3d3 removed the
    "unrecognized JEDEC id" error message, causing the probe function to
    silently abort if the flash ID is unrecognized.
    
    It is desirable to produce diagnostic output in this situation so that
    the user has some idea what went wrong.
    
    Signed-off-by: Kevin Cernekee <cernekee at gmail.com>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/devices/m25p80.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index bf5a002..80404e1 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -764,6 +764,7 @@ static const struct spi_device_id *__devinit jedec_probe(struct spi_device *spi)
 			return &m25p_ids[tmp];
 		}
 	}
+	dev_err(&spi->dev, "unrecognized JEDEC id %06x\n", jedec);
 	return ERR_PTR(-ENODEV);
 }
 



More information about the linux-mtd-cvs mailing list