flash: fix shadow issues on Mac
authorEdgar Grimberg <edgar.grimberg@zylin.com>
Mon, 21 Jun 2010 21:02:41 +0000 (23:02 +0200)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Tue, 22 Jun 2010 06:24:19 +0000 (08:24 +0200)
Wait is declared in /usr/include/sys/wait.h

Signed-off-by: Edgar Grimberg <edgar.grimberg@zylin.com>
src/flash/mflash.c

index 90e9888bdeb136727bb83645a7f1c111a16f32fd..43721280e943d0cf7bac8d78a8b984445c39d0dc 100644 (file)
@@ -209,7 +209,7 @@ static int mg_init_gpio (void)
        return ret;
 }
 
-static int mg_dsk_wait(mg_io_type_wait wait, uint32_t time_var)
+static int mg_dsk_wait(mg_io_type_wait wait_local, uint32_t time_var)
 {
        uint8_t status, error;
        struct target *target = mflash_bank->target;
@@ -228,10 +228,10 @@ static int mg_dsk_wait(mg_io_type_wait wait, uint32_t time_var)
 
                if (status & mg_io_rbit_status_busy)
                {
-                       if (wait == mg_io_wait_bsy)
+                       if (wait_local == mg_io_wait_bsy)
                                return ERROR_OK;
                } else {
-                       switch (wait)
+                       switch (wait_local)
                        {
                                case mg_io_wait_not_bsy:
                                        return ERROR_OK;
@@ -259,7 +259,7 @@ static int mg_dsk_wait(mg_io_type_wait wait, uint32_t time_var)
                                return ERROR_MG_IO;
                        }
 
-                       switch (wait)
+                       switch (wait_local)
                        {
                                case mg_io_wait_rdy:
                                        if (status & mg_io_rbit_status_ready)