aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorMateusz Zalega2014-04-29 20:15:30 +0200
committerPantelis Antoniou2014-05-23 11:19:53 +0300
commitd803fea576c0b9caf2ece1ea1fac0550d3508a4d (patch)
treeca5edfba7378f5ebadaf452621fc4dfa7a3dcc29 /drivers/mmc
parent46c8ebc8cddb81e879d08030f030eca53b123ca9 (diff)
mmc: postponed needless timer initialization
mmc_init() doesn't call get_timer() anymore if MMC is already initialized. <panto> Minor formatting fix. Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: Mateusz Zalega <m.zalega@samsung.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/mmc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 16051e52ff1..0c9ae5d9cdb 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1310,10 +1310,13 @@ static int mmc_complete_init(struct mmc *mmc)
int mmc_init(struct mmc *mmc)
{
int err = IN_PROGRESS;
- unsigned start = get_timer(0);
+ unsigned start;
if (mmc->has_init)
return 0;
+
+ start = get_timer(0);
+
if (!mmc->init_in_progress)
err = mmc_start_init(mmc);