Thread (23 messages) 23 messages, 9 authors, 2014-01-17
STALE4512d
Revisions (9)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v1 current
  4. v1 [diff vs current]
  5. v1 [diff vs current]
  6. v1 [diff vs current]
  7. v1 [diff vs current]
  8. v1 [diff vs current]
  9. v1 [diff vs current]

[PATCH 3/4] thermal: rcar: Add missing clock handling

From: Gerhard Sittig <hidden>
Date: 2014-01-07 20:57:19
Also in: linux-pm, linux-sh

On Tue, Jan 07, 2014 at 19:57 +0100, Geert Uytterhoeven wrote:
quoted hunk ↗ jump to hunk
@@ -378,23 +380,38 @@ static int rcar_thermal_probe(struct platform_device *pdev)
 	spin_lock_init(&common->lock);
 	common->dev = dev;
 
+	common->clk = devm_clk_get(&pdev->dev, NULL);
+	if (IS_ERR(common->clk)) {
+		dev_err(&pdev->dev, "cannot get clock\n");
+		return PTR_ERR(common->clk);
+	}
+
+	ret = clk_prepare(common->clk);
+	if (ret < 0) {
+		dev_err(&pdev->dev, "unable to prepare clock\n");
+		return ret;
+	}
+
+	clk_enable(common->clk);
+
 	pm_runtime_enable(dev);
 	pm_runtime_get_sync(dev);
clk_enable() can fail, too, so you should check its return value


virtually yours
Gerhard Sittig
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help