Commit d7fe833f authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Ulf Hansson

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: default avatarArnd 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: default avatarNicolas Pitre <nico@linaro.org>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent bf614c7a
...@@ -79,11 +79,11 @@ static int mvsd_setup_data(struct mvsd_host *host, struct mmc_data *data) ...@@ -79,11 +79,11 @@ static int mvsd_setup_data(struct mvsd_host *host, struct mmc_data *data)
unsigned long t = jiffies + HZ; unsigned long t = jiffies + HZ;
unsigned int hw_state, count = 0; unsigned int hw_state, count = 0;
do { do {
hw_state = mvsd_read(MVSD_HW_STATE);
if (time_after(jiffies, t)) { if (time_after(jiffies, t)) {
dev_warn(host->dev, "FIFO_EMPTY bit missing\n"); dev_warn(host->dev, "FIFO_EMPTY bit missing\n");
break; break;
} }
hw_state = mvsd_read(MVSD_HW_STATE);
count++; count++;
} while (!(hw_state & (1 << 13))); } while (!(hw_state & (1 << 13)));
dev_dbg(host->dev, "*** wait for FIFO_EMPTY bit " dev_dbg(host->dev, "*** wait for FIFO_EMPTY bit "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment