aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/mmci.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-01-27 05:56:52 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-02-04 08:25:48 -0500
commit51d4375dd72f352594f1a4f1d7598bf9a75b8dfe (patch)
tree723d843595f37c98edcad43711e687e054dddd0e /drivers/mmc/host/mmci.c
parentc4d877c1b3df58d89f01d7b211f58b944356eea3 (diff)
ARM: mmci: no need for separate host->data_xfered
We don't need to store the number of bytes transferred in our host structure - we can store this directly in data->bytes_xfered. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/mmc/host/mmci.c')
-rw-r--r--drivers/mmc/host/mmci.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index bde170d8f723..db2a358143d6 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -142,9 +142,6 @@ mmci_request_end(struct mmci_host *host, struct mmc_request *mrq)
142 host->mrq = NULL; 142 host->mrq = NULL;
143 host->cmd = NULL; 143 host->cmd = NULL;
144 144
145 if (mrq->data)
146 mrq->data->bytes_xfered = host->data_xfered;
147
148 /* 145 /*
149 * Need to drop the host lock here; mmc_request_done may call 146 * Need to drop the host lock here; mmc_request_done may call
150 * back into the driver... 147 * back into the driver...
@@ -202,7 +199,7 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data)
202 199
203 host->data = data; 200 host->data = data;
204 host->size = data->blksz * data->blocks; 201 host->size = data->blksz * data->blocks;
205 host->data_xfered = 0; 202 data->bytes_xfered = 0;
206 203
207 mmci_init_sg(host, data); 204 mmci_init_sg(host, data);
208 205
@@ -311,7 +308,7 @@ mmci_data_irq(struct mmci_host *host, struct mmc_data *data,
311 success = 0; 308 success = 0;
312 data->error = -EIO; 309 data->error = -EIO;
313 } 310 }
314 host->data_xfered = round_down(success, data->blksz); 311 data->bytes_xfered = round_down(success, data->blksz);
315 } 312 }
316 313
317 if (status & MCI_DATABLOCKEND) 314 if (status & MCI_DATABLOCKEND)
@@ -322,7 +319,7 @@ mmci_data_irq(struct mmci_host *host, struct mmc_data *data,
322 319
323 if (!data->error) 320 if (!data->error)
324 /* The error clause is handled above, success! */ 321 /* The error clause is handled above, success! */
325 host->data_xfered += data->blksz * data->blocks; 322 data->bytes_xfered = data->blksz * data->blocks;
326 323
327 if (!data->stop) { 324 if (!data->stop) {
328 mmci_request_end(host, data->mrq); 325 mmci_request_end(host, data->mrq);