Skip to content

Commit

Permalink
mmc: sdhci-pxav3: Remove checks for mandatory host clock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Hesselbarth authored and Ulf Hansson committed Nov 10, 2014
1 parent ff8878f commit 20d5a70
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions drivers/mmc/host/sdhci-pxav3.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,13 +448,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;
}
Expand All @@ -465,13 +463,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;
}
Expand Down

0 comments on commit 20d5a70

Please sign in to comment.