diff options
author | Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | 2014-10-21 05:22:37 -0400 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2014-11-10 06:40:31 -0500 |
commit | 20d5a70344e526f51efe50861be10f6d743b7706 (patch) | |
tree | c0ec2b218e8840f333c215d3ad926c26eaaf40f0 | |
parent | ff8878fd64c0e578d979816a675c8ecb937888bd (diff) |
mmc: sdhci-pxav3: Remove checks for mandatory host clock
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>
-rw-r--r-- | drivers/mmc/host/sdhci-pxav3.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c index d1f63d32b2cd..e52bbbb09d88 100644 --- a/drivers/mmc/host/sdhci-pxav3.c +++ b/drivers/mmc/host/sdhci-pxav3.c | |||
@@ -448,13 +448,11 @@ static int sdhci_pxav3_runtime_suspend(struct device *dev) | |||
448 | struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); | 448 | struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); |
449 | unsigned long flags; | 449 | unsigned long flags; |
450 | 450 | ||
451 | if (pltfm_host->clk) { | 451 | spin_lock_irqsave(&host->lock, flags); |
452 | spin_lock_irqsave(&host->lock, flags); | 452 | host->runtime_suspended = true; |
453 | host->runtime_suspended = true; | 453 | spin_unlock_irqrestore(&host->lock, flags); |
454 | spin_unlock_irqrestore(&host->lock, flags); | ||
455 | 454 | ||
456 | clk_disable_unprepare(pltfm_host->clk); | 455 | clk_disable_unprepare(pltfm_host->clk); |
457 | } | ||
458 | 456 | ||
459 | return 0; | 457 | return 0; |
460 | } | 458 | } |
@@ -465,13 +463,11 @@ static int sdhci_pxav3_runtime_resume(struct device *dev) | |||
465 | struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); | 463 | struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); |
466 | unsigned long flags; | 464 | unsigned long flags; |
467 | 465 | ||
468 | if (pltfm_host->clk) { | 466 | clk_prepare_enable(pltfm_host->clk); |
469 | clk_prepare_enable(pltfm_host->clk); | ||
470 | 467 | ||
471 | spin_lock_irqsave(&host->lock, flags); | 468 | spin_lock_irqsave(&host->lock, flags); |
472 | host->runtime_suspended = false; | 469 | host->runtime_suspended = false; |
473 | spin_unlock_irqrestore(&host->lock, flags); | 470 | spin_unlock_irqrestore(&host->lock, flags); |
474 | } | ||
475 | 471 | ||
476 | return 0; | 472 | return 0; |
477 | } | 473 | } |