summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2014-06-12 14:42:23 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2014-08-11 10:16:16 +0200
commit1cb9da502835dad73dda772b20c1e792f4e71589 (patch)
tree58d8d4272975cf1e5dffcef16140bd33435216e6 /drivers/mmc/host
parent3a33a94ce27068c8fef63a4f9ab7cff1210e2a4e (diff)
downloadblackbird-op-linux-1cb9da502835dad73dda772b20c1e792f4e71589.tar.gz
blackbird-op-linux-1cb9da502835dad73dda772b20c1e792f4e71589.zip
mmc: mmci: Remove redundant check of status for DATA irq
We don't need to verify the content of the status register twice, while we are about to handle a DATA irq. Instead let's leave all verification to be handled by mmci_data_irq(). Cc: Peter Maydell <peter.maydell@linaro.org> Cc: John Stultz <john.stultz@linaro.org> Cc: Russell King <linux@arm.linux.org.uk> Tested-by: Kees Cook <keescook@chromium.org> Tested-by: John Stultz <john.stultz@linaro.org> Cc: <stable@vger.kernel.org> # v3.15+ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/mmci.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 6483c5cc6735..a723ed2883f9 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -888,6 +888,10 @@ static void
mmci_data_irq(struct mmci_host *host, struct mmc_data *data,
unsigned int status)
{
+ /* Make sure we have data to handle */
+ if (!data)
+ return;
+
/* First check for errors */
if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_STARTBITERR|
MCI_TXUNDERRUN|MCI_RXOVERRUN)) {
@@ -1206,7 +1210,6 @@ static irqreturn_t mmci_irq(int irq, void *dev_id)
do {
struct mmc_command *cmd;
- struct mmc_data *data;
status = readl(host->base + MMCISTATUS);
@@ -1232,11 +1235,7 @@ static irqreturn_t mmci_irq(int irq, void *dev_id)
MCI_CMDSENT|MCI_CMDRESPEND) && cmd)
mmci_cmd_irq(host, cmd, status);
- data = host->data;
- if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_STARTBITERR|
- MCI_TXUNDERRUN|MCI_RXOVERRUN|MCI_DATAEND|
- MCI_DATABLOCKEND) && data)
- mmci_data_irq(host, data, status);
+ mmci_data_irq(host, host->data, status);
/* Don't poll for busy completion in irq context. */
if (host->busy_status)
OpenPOWER on IntegriCloud