mmc: put the led blinking code after clock ungating
authorPierre Tardy <pierre.tardy@intel.com>
Sun, 6 Feb 2011 18:02:48 +0000 (19:02 +0100)
committerChris Ball <cjb@laptop.org>
Tue, 15 Mar 2011 17:48:30 +0000 (13:48 -0400)
Since mmc clock gating can also be used as a power gating
tip, it's better to put the led blinking after having
ungated the clock.

Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/core/core.c

index 150b5f3cd401a7c8549e9e15910a1107b713986e..2af2ee1a2265aa01820b46c6dba9acedd71e01c9 100644 (file)
@@ -167,8 +167,6 @@ mmc_start_request(struct mmc_host *host, struct mmc_request *mrq)
 
        WARN_ON(!host->claimed);
 
-       led_trigger_event(host->led, LED_FULL);
-
        mrq->cmd->error = 0;
        mrq->cmd->mrq = mrq;
        if (mrq->data) {
@@ -194,6 +192,7 @@ mmc_start_request(struct mmc_host *host, struct mmc_request *mrq)
                }
        }
        mmc_host_clk_ungate(host);
+       led_trigger_event(host->led, LED_FULL);
        host->ops->request(host, mrq);
 }