浏览代码

mmc: atmel_mci: fix print incorrect buffer content for debug

Signed-off-by: Josh Wu <josh.wu@atmel.com>
[fix checkpatch line length warning]
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Wu, Josh 11 年之前
父节点
当前提交
9902c7b6f1
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      drivers/mmc/gen_atmel_mci.c

+ 3 - 2
drivers/mmc/gen_atmel_mci.c

@@ -243,9 +243,10 @@ mci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
 #ifdef DEBUG
 			if (data->flags & MMC_DATA_READ)
 			{
+				u32 cnt = word_count * 4;
 				printf("Read Data:\n");
-				print_buffer(0, data->dest, 1,
-					word_count*4, 0);
+				print_buffer(0, data->dest + cnt * block_count,
+					     1, cnt, 0);
 			}
 #endif
 #ifdef DEBUG