mmc: core: core.c fix compile warnings
Philip Rakity [Mon, 22 Jul 2013 10:00:04 +0000 (11:00 +0100)]
Change-Id: I950fd9e7424fcbf072d36c191e4eb42bc28362d0
Signed-off-by: Philip Rakity <prakity@nvidia.com>
(cherry picked from commit 3da3329eeeb7eff6f125c363b535633270a3ad8e)
Reviewed-on: http://git-master/r/269597
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

drivers/mmc/core/core.c

index ca05679..84667ef 100644 (file)
@@ -153,11 +153,11 @@ void mmc_request_done(struct mmc_host *host, struct mmc_request *mrq)
 {
        struct mmc_command *cmd = mrq->cmd;
        int err = cmd->error;
+#ifdef CONFIG_MMC_FREQ_SCALING
        ktime_t t;
        unsigned long time;
        unsigned long flags;
 
-#ifdef CONFIG_MMC_FREQ_SCALING
        if (host->dev_stats) {
                t = ktime_get();
                time = ktime_us_delta(t, host->dev_stats->t_busy);
@@ -3036,13 +3036,14 @@ EXPORT_SYMBOL(mmc_cache_ctrl);
 int mmc_suspend_host(struct mmc_host *host)
 {
        int err = 0;
-       ktime_t t;
 
        if (mmc_bus_needs_resume(host))
                return 0;
 
 #ifdef CONFIG_MMC_FREQ_SCALING
        if (host->df) {
+               ktime_t t;
+
                cancel_delayed_work_sync(&host->dfs_work);
 
                t = ktime_get();