diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2017-02-07 22:34:41 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2017-02-14 09:10:55 +0100 |
commit | 690f90b628aaa5800244d0c6d06f2c0fa2d57e22 (patch) | |
tree | 3fad740b995fb9ca3a456d1fb98936d6a4214912 /drivers/mmc | |
parent | 5da86887638d7a833c75880b7fd8ba738aa102a7 (diff) | |
download | op-kernel-dev-690f90b628aaa5800244d0c6d06f2c0fa2d57e22.zip op-kernel-dev-690f90b628aaa5800244d0c6d06f2c0fa2d57e22.tar.gz |
mmc: meson-gx: improve meson_mmc_irq_thread
Remove unneeded variable ret and simplify the if block.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/meson-gx-mmc.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index d6a4dfa..dd7f936 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -666,7 +666,6 @@ static irqreturn_t meson_mmc_irq_thread(int irq, void *dev_id) struct mmc_command *cmd = host->cmd; struct mmc_data *data; unsigned int xfer_bytes; - int ret = IRQ_HANDLED; if (WARN_ON(!mrq)) return IRQ_NONE; @@ -675,14 +674,12 @@ static irqreturn_t meson_mmc_irq_thread(int irq, void *dev_id) return IRQ_NONE; data = cmd->data; - if (data) { + if (data && data->flags & MMC_DATA_READ) { xfer_bytes = data->blksz * data->blocks; - if (data->flags & MMC_DATA_READ) { - WARN_ON(xfer_bytes > host->bounce_buf_size); - sg_copy_from_buffer(data->sg, data->sg_len, - host->bounce_buf, xfer_bytes); - data->bytes_xfered = xfer_bytes; - } + WARN_ON(xfer_bytes > host->bounce_buf_size); + sg_copy_from_buffer(data->sg, data->sg_len, + host->bounce_buf, xfer_bytes); + data->bytes_xfered = xfer_bytes; } meson_mmc_read_resp(host->mmc, cmd); @@ -691,7 +688,7 @@ static irqreturn_t meson_mmc_irq_thread(int irq, void *dev_id) else meson_mmc_start_cmd(host->mmc, data->stop); - return ret; + return IRQ_HANDLED; } /* |