Patchwork gen_probe.c: Probe chips in decreasing device size (most significant first)

login
register
mail settings
Submitter Michel Stempin
Date Sept. 14, 2008, 11:09 a.m.
Message ID <1221390552.25179.14.camel@Mikeul>
Download mbox | patch
Permalink /patch/274/
State Changes Requested
Headers show

Comments

Michel Stempin - Sept. 14, 2008, 11:09 a.m.
Probe chips in decreasing device size to detect most significant chip
IDs first in case there are two chips with the same LSB.

This case has been found between SST39VF3201 (Mfr: 0x0020, Id: 0x235B)
and SST49LF080A (Mfr: 0x0020, Id: 0x005B) chips.

Signed-off-by: Michel Stempin <michel.stempin@wanadoo.fr>
Josh Boyer - Oct. 8, 2008, 12:46 p.m.
On Sun, Sep 14, 2008 at 01:09:12PM +0200, Michel Stempin wrote:
>Probe chips in decreasing device size to detect most significant chip
>IDs first in case there are two chips with the same LSB.
>
>This case has been found between SST39VF3201 (Mfr: 0x0020, Id: 0x235B)
>and SST49LF080A (Mfr: 0x0020, Id: 0x005B) chips.
>
>Signed-off-by: Michel Stempin <michel.stempin@wanadoo.fr>

Your patch is word-wrapped.

josh

Patch

diff --git a/drivers/mtd/chips/gen_probe.c
b/drivers/mtd/chips/gen_probe.c
index f061885..d1875f8 100644
--- a/drivers/mtd/chips/gen_probe.c
+++ b/drivers/mtd/chips/gen_probe.c
@@ -170,7 +170,7 @@  static int genprobe_new_chip(struct map_info *map,
struct chip_probe *cp,
 {
        int min_chips = (map_bankwidth(map)/4?:1); /* At most 4-bytes
wide. */
        int max_chips = map_bankwidth(map); /* And minimum 1 */
-       int nr_chips, type;
+       int nr_chips, min_type, type;