From: Mateusz Zalega Date: Tue, 29 Apr 2014 18:15:30 +0000 (+0200) Subject: mmc: postponed needless timer initialization X-Git-Tag: v2014.07-rc2~7^2~8 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d803fea576c0b9caf2ece1ea1fac0550d3508a4d;p=u-boot mmc: postponed needless timer initialization mmc_init() doesn't call get_timer() anymore if MMC is already initialized. Minor formatting fix. Acked-by: Pantelis Antoniou Signed-off-by: Mateusz Zalega --- diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 16051e52ff..0c9ae5d9cd 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);