diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-27 10:56:52 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-02-04 13:25:48 +0000 |
commit | 51d4375dd72f352594f1a4f1d7598bf9a75b8dfe (patch) | |
tree | 723d843595f37c98edcad43711e687e054dddd0e /drivers/mmc | |
parent | c4d877c1b3df58d89f01d7b211f58b944356eea3 (diff) | |
download | op-kernel-dev-51d4375dd72f352594f1a4f1d7598bf9a75b8dfe.zip op-kernel-dev-51d4375dd72f352594f1a4f1d7598bf9a75b8dfe.tar.gz |
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')
-rw-r--r-- | drivers/mmc/host/mmci.c | 9 | ||||
-rw-r--r-- | drivers/mmc/host/mmci.h | 2 |
2 files changed, 3 insertions, 8 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index bde170d8..db2a358 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) host->mrq = NULL; host->cmd = NULL; - if (mrq->data) - mrq->data->bytes_xfered = host->data_xfered; - /* * Need to drop the host lock here; mmc_request_done may call * back into the driver... @@ -202,7 +199,7 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data) host->data = data; host->size = data->blksz * data->blocks; - host->data_xfered = 0; + data->bytes_xfered = 0; mmci_init_sg(host, data); @@ -311,7 +308,7 @@ mmci_data_irq(struct mmci_host *host, struct mmc_data *data, success = 0; data->error = -EIO; } - host->data_xfered = round_down(success, data->blksz); + data->bytes_xfered = round_down(success, data->blksz); } if (status & MCI_DATABLOCKEND) @@ -322,7 +319,7 @@ mmci_data_irq(struct mmci_host *host, struct mmc_data *data, if (!data->error) /* The error clause is handled above, success! */ - host->data_xfered += data->blksz * data->blocks; + data->bytes_xfered = data->blksz * data->blocks; if (!data->stop) { mmci_request_end(host, data->mrq); diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h index c1df7b8..164ce06 100644 --- a/drivers/mmc/host/mmci.h +++ b/drivers/mmc/host/mmci.h @@ -161,8 +161,6 @@ struct mmci_host { int gpio_cd_irq; bool singleirq; - unsigned int data_xfered; - spinlock_t lock; unsigned int mclk; |