[PATCH 3/4] thermal: rcar: Add missing clock handling
From: Kuninori Morimoto <hidden>
Date: 2014-01-08 01:08:16
Also in:
linux-pm, linux-sh
From: Kuninori Morimoto <hidden>
Date: 2014-01-08 01:08:16
Also in:
linux-pm, linux-sh
Hi Geert
+ 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);You can use "dev" instead of "&pdev->dev" :) And this patch seems strange for me. pm_runtime_xxx() is doing same things. If it didn't work, wrong place is not driver, clock side ?