aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/tmio_mmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/tmio_mmc.c')
-rw-r--r--drivers/mmc/host/tmio_mmc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
index ee7d0a5a51c4..69d98e3bf6ab 100644
--- a/drivers/mmc/host/tmio_mmc.c
+++ b/drivers/mmc/host/tmio_mmc.c
@@ -164,6 +164,7 @@ tmio_mmc_start_command(struct tmio_mmc_host *host, struct mmc_command *cmd)
164static void tmio_mmc_pio_irq(struct tmio_mmc_host *host) 164static void tmio_mmc_pio_irq(struct tmio_mmc_host *host)
165{ 165{
166 struct mmc_data *data = host->data; 166 struct mmc_data *data = host->data;
167 void *sg_virt;
167 unsigned short *buf; 168 unsigned short *buf;
168 unsigned int count; 169 unsigned int count;
169 unsigned long flags; 170 unsigned long flags;
@@ -173,8 +174,8 @@ static void tmio_mmc_pio_irq(struct tmio_mmc_host *host)
173 return; 174 return;
174 } 175 }
175 176
176 buf = (unsigned short *)(tmio_mmc_kmap_atomic(host, &flags) + 177 sg_virt = tmio_mmc_kmap_atomic(host->sg_ptr, &flags);
177 host->sg_off); 178 buf = (unsigned short *)(sg_virt + host->sg_off);
178 179
179 count = host->sg_ptr->length - host->sg_off; 180 count = host->sg_ptr->length - host->sg_off;
180 if (count > data->blksz) 181 if (count > data->blksz)
@@ -191,7 +192,7 @@ static void tmio_mmc_pio_irq(struct tmio_mmc_host *host)
191 192
192 host->sg_off += count; 193 host->sg_off += count;
193 194
194 tmio_mmc_kunmap_atomic(host, &flags); 195 tmio_mmc_kunmap_atomic(sg_virt, &flags);
195 196
196 if (host->sg_off == host->sg_ptr->length) 197 if (host->sg_off == host->sg_ptr->length)
197 tmio_mmc_next_sg(host); 198 tmio_mmc_next_sg(host);