]> git.sur5r.net Git - u-boot/commitdiff
mmc: postponed needless timer initialization
authorMateusz Zalega <m.zalega@samsung.com>
Tue, 29 Apr 2014 18:15:30 +0000 (20:15 +0200)
committerPantelis Antoniou <panto@antoniou-consulting.com>
Fri, 23 May 2014 08:19:53 +0000 (11:19 +0300)
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>
drivers/mmc/mmc.c

index 16051e52ff1659d24f5a07f46e82d47e21503182..0c9ae5d9cdb421755e32af59321bdbc3a9776bd7 100644 (file)
@@ -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);