summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMateusz Zalega <m.zalega@samsung.com>2014-04-29 20:15:30 +0200
committerPantelis Antoniou <panto@antoniou-consulting.com>2014-05-23 11:19:53 +0300
commitd803fea576c0b9caf2ece1ea1fac0550d3508a4d (patch)
treeca5edfba7378f5ebadaf452621fc4dfa7a3dcc29 /drivers
parent46c8ebc8cddb81e879d08030f030eca53b123ca9 (diff)
downloadu-boot-imx-d803fea576c0b9caf2ece1ea1fac0550d3508a4d.zip
u-boot-imx-d803fea576c0b9caf2ece1ea1fac0550d3508a4d.tar.gz
u-boot-imx-d803fea576c0b9caf2ece1ea1fac0550d3508a4d.tar.bz2
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')
-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 16051e5..0c9ae5d 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);