All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: pxamci: prepare and unprepare the clocks
@ 2014-06-09 19:56 Robert Jarzmik
  2014-09-01  9:09 ` Robert Jarzmik
  2014-09-01 10:31 ` Ulf Hansson
  0 siblings, 2 replies; 8+ messages in thread
From: Robert Jarzmik @ 2014-06-09 19:56 UTC (permalink / raw)
  To: Chris Ball, Ulf Hansson; +Cc: linux-mmc, Robert Jarzmik

Add the clock prepare and unprepare call to the driver initialization
phase. This will remove a warning once the PXA architecture is migrated
to the clock infrastructure.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
 drivers/mmc/host/pxamci.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index 32fe113..f0f2074 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -681,6 +681,9 @@ static int pxamci_probe(struct platform_device *pdev)
 		host->clk = NULL;
 		goto out;
 	}
+	ret = clk_prepare(host->clk);
+	if (ret)
+		goto out;
 
 	host->clkrate = clk_get_rate(host->clk);
 
@@ -820,8 +823,10 @@ err_gpio_ro:
 			iounmap(host->base);
 		if (host->sg_cpu)
 			dma_free_coherent(&pdev->dev, PAGE_SIZE, host->sg_cpu, host->sg_dma);
-		if (host->clk)
+		if (host->clk) {
+			clk_unprepare(host->clk);
 			clk_put(host->clk);
+		}
 	}
 	if (mmc)
 		mmc_free_host(mmc);
@@ -871,6 +876,7 @@ static int pxamci_remove(struct platform_device *pdev)
 		iounmap(host->base);
 		dma_free_coherent(&pdev->dev, PAGE_SIZE, host->sg_cpu, host->sg_dma);
 
+		clk_unprepare(host->clk);
 		clk_put(host->clk);
 
 		release_resource(host->res);
-- 
2.0.0.rc2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-09-02  9:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-09 19:56 [PATCH] mmc: pxamci: prepare and unprepare the clocks Robert Jarzmik
2014-09-01  9:09 ` Robert Jarzmik
2014-09-01 10:31 ` Ulf Hansson
2014-09-01 12:20   ` Robert Jarzmik
2014-09-01 12:49     ` Ulf Hansson
2014-09-01 13:28       ` Robert Jarzmik
2014-09-02  7:53         ` Ulf Hansson
2014-09-02  9:02           ` Robert Jarzmik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.