]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mmc: sdhci-pxav3: Remove checks for mandatory host clock
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tue, 21 Oct 2014 09:22:37 +0000 (11:22 +0200)
committerLuis Henriques <luis.henriques@canonical.com>
Tue, 24 Feb 2015 10:01:10 +0000 (10:01 +0000)
commit 20d5a70344e526f51efe50861be10f6d743b7706 upstream.

NULL-checking a struct clk it not only wrong but also not required as
for PXAv3 driver the corresponding clock is mandatory. Remove the
checks from sdhci_pxav3_runtime_{suspend,resume}.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
drivers/mmc/host/sdhci-pxav3.c

index 81143e57b2ffa79e8309e38bd0113884b688b32b..f62655bc1604f4bd7d013cc8bca0acae7daba341 100644 (file)
@@ -450,13 +450,11 @@ static int sdhci_pxav3_runtime_suspend(struct device *dev)
        struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
        unsigned long flags;
 
-       if (pltfm_host->clk) {
-               spin_lock_irqsave(&host->lock, flags);
-               host->runtime_suspended = true;
-               spin_unlock_irqrestore(&host->lock, flags);
+       spin_lock_irqsave(&host->lock, flags);
+       host->runtime_suspended = true;
+       spin_unlock_irqrestore(&host->lock, flags);
 
-               clk_disable_unprepare(pltfm_host->clk);
-       }
+       clk_disable_unprepare(pltfm_host->clk);
 
        return 0;
 }
@@ -467,13 +465,11 @@ static int sdhci_pxav3_runtime_resume(struct device *dev)
        struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
        unsigned long flags;
 
-       if (pltfm_host->clk) {
-               clk_prepare_enable(pltfm_host->clk);
+       clk_prepare_enable(pltfm_host->clk);
 
-               spin_lock_irqsave(&host->lock, flags);
-               host->runtime_suspended = false;
-               spin_unlock_irqrestore(&host->lock, flags);
-       }
+       spin_lock_irqsave(&host->lock, flags);
+       host->runtime_suspended = false;
+       spin_unlock_irqrestore(&host->lock, flags);
 
        return 0;
 }