| From ab55963f97051ba4a7ae0e6a6b7cc0e33a027d96 Mon Sep 17 00:00:00 2001 |
| From: Ulf Hansson <ulf.hansson@linaro.org> |
| Date: Tue, 1 Oct 2013 14:56:57 +0200 |
| Subject: mmc: sh_mmcif: Convert to clk_prepare|unprepare |
| |
| Previously only clk_enable|disable were being used. Adapt properly |
| to the clock API, by also using clk_prepare|unprepare. |
| |
| Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> |
| Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> |
| Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> |
| Signed-off-by: Chris Ball <cjb@laptop.org> |
| (cherry picked from commit ac0a2e98927e4797ae716b7327c3a9c85ba5431c) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| drivers/mmc/host/sh_mmcif.c | 12 ++++++------ |
| 1 file changed, 6 insertions(+), 6 deletions(-) |
| |
| diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c |
| index 32bc4121c965..d032b080ac4d 100644 |
| --- a/drivers/mmc/host/sh_mmcif.c |
| +++ b/drivers/mmc/host/sh_mmcif.c |
| @@ -964,7 +964,7 @@ static void sh_mmcif_request(struct mmc_host *mmc, struct mmc_request *mrq) |
| |
| static int sh_mmcif_clk_update(struct sh_mmcif_host *host) |
| { |
| - int ret = clk_enable(host->hclk); |
| + int ret = clk_prepare_enable(host->hclk); |
| |
| if (!ret) { |
| host->clk = clk_get_rate(host->hclk); |
| @@ -1018,7 +1018,7 @@ static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) |
| } |
| if (host->power) { |
| pm_runtime_put_sync(&host->pd->dev); |
| - clk_disable(host->hclk); |
| + clk_disable_unprepare(host->hclk); |
| host->power = false; |
| if (ios->power_mode == MMC_POWER_OFF) |
| sh_mmcif_set_power(host, ios); |
| @@ -1466,7 +1466,7 @@ static int sh_mmcif_probe(struct platform_device *pdev) |
| |
| mutex_init(&host->thread_lock); |
| |
| - clk_disable(host->hclk); |
| + clk_disable_unprepare(host->hclk); |
| ret = mmc_add_host(mmc); |
| if (ret < 0) |
| goto emmcaddh; |
| @@ -1487,7 +1487,7 @@ ereqirq1: |
| ereqirq0: |
| pm_runtime_suspend(&pdev->dev); |
| eresume: |
| - clk_disable(host->hclk); |
| + clk_disable_unprepare(host->hclk); |
| eclkupdate: |
| clk_put(host->hclk); |
| eclkget: |
| @@ -1505,7 +1505,7 @@ static int sh_mmcif_remove(struct platform_device *pdev) |
| int irq[2]; |
| |
| host->dying = true; |
| - clk_enable(host->hclk); |
| + clk_prepare_enable(host->hclk); |
| pm_runtime_get_sync(&pdev->dev); |
| |
| dev_pm_qos_hide_latency_limit(&pdev->dev); |
| @@ -1530,7 +1530,7 @@ static int sh_mmcif_remove(struct platform_device *pdev) |
| if (irq[1] >= 0) |
| free_irq(irq[1], host); |
| |
| - clk_disable(host->hclk); |
| + clk_disable_unprepare(host->hclk); |
| mmc_free_host(host->mmc); |
| pm_runtime_put_sync(&pdev->dev); |
| pm_runtime_disable(&pdev->dev); |
| -- |
| 1.8.5.rc3 |
| |