mtd: m25p80: Fix false-positive probing
authorAnton Vorontsov <avorontsov@mvista.com>
Tue, 22 Jun 2010 16:57:34 +0000 (20:57 +0400)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 4 Aug 2010 09:57:47 +0000 (10:57 +0100)
commitf7b000904a848b64c36e3b4d0715744aaf345767
tree2c22f8791522d8b4039731670c97371aa17a464a
parentdd02b67d5e9e7896891fa27eb5db65f55a290998
mtd: m25p80: Fix false-positive probing

Since commit 18c6182bae0acca220ed6611f741034d563cd19f ("Rework
probing/JEDEC code"), m25p80 driver successfully registers chips
even if JEDEC probing fails.

This was needed to support non-JEDEC flashes. Though, it appears
that some platforms (e.g. blackfin bf533 stamp[1]) used the old
behavior to detect if there's any flash connected, so the driver
have to fail on JEDEC probing errors.

This patch restores the old behavior for JEDEC flashes, and adds
"-nonjedec" SPI device IDs for M25Pxx flashes, so that the kernel
still supports non-JEDEC flashes.

[1] http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=5975

Reported-by: Mingquan Pan
Reported-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/devices/m25p80.c