From c77ce474b1c57b13e9d36d9830f147966c143694 Mon Sep 17 00:00:00 2001 From: Stelian Pop Date: Mon, 14 Jan 2008 22:08:14 +0100 Subject: Fix incorrect address test in AT91F_DataflashSelect(). Signed-off-by: Stelian Pop --- drivers/mtd/dataflash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mtd') diff --git a/drivers/mtd/dataflash.c b/drivers/mtd/dataflash.c index 91903c8c8f..3ebb7064f2 100644 --- a/drivers/mtd/dataflash.c +++ b/drivers/mtd/dataflash.c @@ -304,7 +304,7 @@ AT91PS_DataFlash AT91F_DataflashSelect (AT91PS_DataFlash pFlash, for (i = 0; i < CFG_MAX_DATAFLASH_BANKS; i++) if ( dataflash_info[i].id - && ((((int) addr) & 0xFF000000) == + && ((((int) *addr) & 0xFF000000) == dataflash_info[i].logical_address)) { addr_valid = 1; break; -- cgit From 3cfb0c51b2bb5ede54eca85ace5b1ba12be314b0 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Thu, 17 Jan 2008 00:02:10 -0600 Subject: Remove duplicate defines for ARRAY_SIZE Signed-off-by: Kumar Gala --- drivers/mtd/jedec_flash.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'drivers/mtd') diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c index 94e87cbf00..41aad3bd6a 100644 --- a/drivers/mtd/jedec_flash.c +++ b/drivers/mtd/jedec_flash.c @@ -218,10 +218,6 @@ static const struct amd_flash_info jedec_table[] = { #endif }; - -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) - - static inline void fill_info(flash_info_t *info, const struct amd_flash_info *jedec_entry, ulong base) { int i,j; -- cgit