1 From d32f45357f0475a2f810752eeb9412fe692e1c0a Mon Sep 17 00:00:00 2001
2 From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
3 Date: Wed, 7 Nov 2012 14:09:21 +0100
4 Subject: sf: eon: use 16 bit ID for comparison
6 Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 --- a/drivers/mtd/spi/eon.c
9 +++ b/drivers/mtd/spi/eon.c
11 #include "spi_flash_internal.h"
13 struct eon_spi_flash_params {
20 static const struct eon_spi_flash_params eon_spi_flash_table[] = {
33 @@ -33,10 +33,11 @@ int spi_flash_probe_eon(struct spi_flash
35 const struct eon_spi_flash_params *params;
37 + u16 id = idcode[2] | idcode[1] << 8;
39 for (i = 0; i < ARRAY_SIZE(eon_spi_flash_table); ++i) {
40 params = &eon_spi_flash_table[i];
41 - if (params->idcode1 == idcode[2])
42 + if (params->idcode == id)