summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/mvsdio.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-06-05 23:14:39 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2014-06-12 10:50:27 +0200
commitd7fe833f3fc9a02806c96dd28f48e5e28c8484a8 (patch)
treebc09795e0077d2755541244979561319a0c7ea55 /drivers/mmc/host/mvsdio.c
parentbf614c7a214592c4cd2a2ccffc0f43539437af6b (diff)
mmc: mvsdio: avoid compiler warning
gcc correctly points out that hw_state can be used uninitially in the mvsd_setup_data() function. This rearranges the function to ensure it always contains a proper value. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Nicolas Pitre <nico@fluxnic.net> Cc: Chris Ball <chris@printf.net> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Andrew Lunn <andrew@lunn.ch> Cc: linux-mmc@vger.kernel.org Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/mvsdio.c')
-rw-r--r--drivers/mmc/host/mvsdio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
index 9377284f8544..6b4c5ad3b393 100644
--- a/drivers/mmc/host/mvsdio.c
+++ b/drivers/mmc/host/mvsdio.c
@@ -79,11 +79,11 @@ static int mvsd_setup_data(struct mvsd_host *host, struct mmc_data *data)
unsigned long t = jiffies + HZ;
unsigned int hw_state, count = 0;
do {
+ hw_state = mvsd_read(MVSD_HW_STATE);
if (time_after(jiffies, t)) {
dev_warn(host->dev, "FIFO_EMPTY bit missing\n");
break;
}
- hw_state = mvsd_read(MVSD_HW_STATE);
count++;
} while (!(hw_state & (1 << 13)));
dev_dbg(host->dev, "*** wait for FIFO_EMPTY bit "