summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sh_mmcif.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-12-12 15:38:13 +0100
committerChris Ball <cjb@laptop.org>2013-02-11 19:28:25 +0100
commit99eb9d8df996fc1695d4de687873875fbd8f6719 (patch)
tree78dab93822ed260522ed61db1564de03cebb1ad7 /drivers/mmc/host/sh_mmcif.c
parentmmc: sh_mmcif: Terminate DMA transactions when detecting timeout or error (diff)
downloadlinux-99eb9d8df996fc1695d4de687873875fbd8f6719.tar.xz
linux-99eb9d8df996fc1695d4de687873875fbd8f6719.zip
mmc: sh_mmcif: (cosmetic) simplify boolean return blocks
Use "return condition" instead of "if (condition) return true; return false" in functions, returning bool. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sh_mmcif.c')
-rw-r--r--drivers/mmc/host/sh_mmcif.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 8aa7b0e6dec2..de4b6d073599 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -542,10 +542,7 @@ static bool sh_mmcif_next_block(struct sh_mmcif_host *host, u32 *p)
host->pio_ptr = p;
}
- if (host->sg_idx == data->sg_len)
- return false;
-
- return true;
+ return host->sg_idx != data->sg_len;
}
static void sh_mmcif_single_read(struct sh_mmcif_host *host,
@@ -1071,9 +1068,7 @@ static bool sh_mmcif_end_cmd(struct sh_mmcif_host *host)
if (!host->dma_active) {
data->error = sh_mmcif_data_trans(host, host->mrq, cmd->opcode);
- if (!data->error)
- return true;
- return false;
+ return !data->error;
}
/* Running in the IRQ thread, can sleep */