Fix incorrect address test in AT91F_DataflashSelect().
authorStelian Pop <stelian@popies.net>
Mon, 14 Jan 2008 21:08:14 +0000 (22:08 +0100)
committerWolfgang Denk <wd@denx.de>
Wed, 13 Feb 2008 23:37:23 +0000 (00:37 +0100)
Signed-off-by: Stelian Pop <stelian@popies.net>
drivers/mtd/dataflash.c

index 91903c8c8f739abd7c2310d3220483af6982f42f..3ebb7064f2f90b88693c159173f7fdf22999543c 100644 (file)
@@ -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;