aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/core/core.c')
-rw-r--r--drivers/mmc/core/core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 3ee5b8c3b5ce..044d84eeed7c 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -121,6 +121,7 @@ mmc_start_request(struct mmc_host *host, struct mmc_request *mrq)
121{ 121{
122#ifdef CONFIG_MMC_DEBUG 122#ifdef CONFIG_MMC_DEBUG
123 unsigned int i, sz; 123 unsigned int i, sz;
124 struct scatterlist *sg;
124#endif 125#endif
125 126
126 pr_debug("%s: starting CMD%u arg %08x flags %08x\n", 127 pr_debug("%s: starting CMD%u arg %08x flags %08x\n",
@@ -156,8 +157,8 @@ mmc_start_request(struct mmc_host *host, struct mmc_request *mrq)
156 157
157#ifdef CONFIG_MMC_DEBUG 158#ifdef CONFIG_MMC_DEBUG
158 sz = 0; 159 sz = 0;
159 for (i = 0;i < mrq->data->sg_len;i++) 160 for_each_sg(mrq->data->sg, sg, mrq->data->sg_len, i)
160 sz += mrq->data->sg[i].length; 161 sz += sg->length;
161 BUG_ON(sz != mrq->data->blocks * mrq->data->blksz); 162 BUG_ON(sz != mrq->data->blocks * mrq->data->blksz);
162#endif 163#endif
163 164