spi/stmicro: fix debug() display of cmd
authorMike Frysinger <vapier@gentoo.org>
Thu, 11 Dec 2008 23:39:08 +0000 (18:39 -0500)
committerWolfgang Denk <wd@denx.de>
Mon, 15 Dec 2008 23:48:18 +0000 (00:48 +0100)
The stmicro_wait_ready() func tries to show the actual opcode that was sent
to the device, but instead it displays the array pointer.  Fix it to pull
out the opcode from the start of the array.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
drivers/mtd/spi/stmicro.c

index b8b835a..86324e4 100644 (file)
@@ -137,7 +137,7 @@ static int stmicro_wait_ready(struct spi_flash *flash, unsigned long timeout)
 
        ret = spi_xfer(spi, 32, &cmd[0], NULL, SPI_XFER_BEGIN);
        if (ret) {
-               debug("SF: Failed to send command %02x: %d\n", cmd, ret);
+               debug("SF: Failed to send command %02x: %d\n", cmd[0], ret);
                return ret;
        }