From d803fea576c0b9caf2ece1ea1fac0550d3508a4d Mon Sep 17 00:00:00 2001 From: Mateusz Zalega Date: Tue, 29 Apr 2014 20:15:30 +0200 Subject: [PATCH] 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 --- drivers/mmc/mmc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.7.4