mirror of https://gitee.com/openkylin/linux.git
clk: qcom: camcc-sc7180: Use runtime PM ops instead of clk ones
Let's call pm_runtime_get() here instead of calling the PM clk APIs
directly. This avoids a compilation problem on CONFIG_PM=n where the
pm_clk_runtime_{resume,suspend}() functions don't exist and covers the
intent, i.e. enable the clks for this device so we can program PLL
settings.
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Taniya Das <tdas@codeaurora.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Fixes: 15d09e830b
("clk: qcom: camcc: Add camera clock controller driver for SC7180")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20201114174408.579047-1-sboyd@kernel.org
This commit is contained in:
parent
e4accab4e0
commit
8d4025943e
|
@ -1669,16 +1669,14 @@ static int cam_cc_sc7180_probe(struct platform_device *pdev)
|
|||
goto disable_pm_runtime;
|
||||
}
|
||||
|
||||
ret = pm_clk_runtime_resume(&pdev->dev);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "pm runtime resume failed\n");
|
||||
ret = pm_runtime_get(&pdev->dev);
|
||||
if (ret)
|
||||
goto destroy_pm_clk;
|
||||
}
|
||||
|
||||
regmap = qcom_cc_map(pdev, &cam_cc_sc7180_desc);
|
||||
if (IS_ERR(regmap)) {
|
||||
ret = PTR_ERR(regmap);
|
||||
pm_clk_runtime_suspend(&pdev->dev);
|
||||
pm_runtime_put(&pdev->dev);
|
||||
goto destroy_pm_clk;
|
||||
}
|
||||
|
||||
|
@ -1688,9 +1686,7 @@ static int cam_cc_sc7180_probe(struct platform_device *pdev)
|
|||
clk_fabia_pll_configure(&cam_cc_pll3, regmap, &cam_cc_pll3_config);
|
||||
|
||||
ret = qcom_cc_really_probe(pdev, &cam_cc_sc7180_desc, regmap);
|
||||
|
||||
pm_clk_runtime_suspend(&pdev->dev);
|
||||
|
||||
pm_runtime_put(&pdev->dev);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "Failed to register CAM CC clocks\n");
|
||||
goto destroy_pm_clk;
|
||||
|
|
Loading…
Reference in New Issue