Skip to content

Commit e2349da

Browse files
jhovoldandersson
authored andcommitted
clk: qcom: mss-sc7180: fix missing resume during probe
Drivers that enable runtime PM must make sure that the controller is runtime resumed before accessing its registers to prevent the power domain from being disabled. Fixes: 8def929 ("clk: qcom: Add modem clock controller driver for SC7180") Cc: [email protected] # 5.7 Cc: Taniya Das <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 97112c8 commit e2349da

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

drivers/clk/qcom/mss-sc7180.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,22 @@ static int mss_sc7180_probe(struct platform_device *pdev)
8787
return ret;
8888
}
8989

90+
ret = pm_runtime_resume_and_get(&pdev->dev);
91+
if (ret)
92+
return ret;
93+
9094
ret = qcom_cc_probe(pdev, &mss_sc7180_desc);
9195
if (ret < 0)
92-
return ret;
96+
goto err_put_rpm;
97+
98+
pm_runtime_put(&pdev->dev);
9399

94100
return 0;
101+
102+
err_put_rpm:
103+
pm_runtime_put_sync(&pdev->dev);
104+
105+
return ret;
95106
}
96107

97108
static const struct dev_pm_ops mss_sc7180_pm_ops = {

0 commit comments

Comments
 (0)