瀏覽代碼

spi/stmicro: fix debug() display of cmd

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>
Mike Frysinger 16 年之前
父節點
當前提交
84bc72d90c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/mtd/spi/stmicro.c

+ 1 - 1
drivers/mtd/spi/stmicro.c

@@ -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);
 	ret = spi_xfer(spi, 32, &cmd[0], NULL, SPI_XFER_BEGIN);
 	if (ret) {
 	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;
 		return ret;
 	}
 	}