Browse Source

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 năm trước cách đây
mục cha
commit
9902c7b6f1
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  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