Skip to content

Commit 599618e

Browse files
committed
Merge tag 'devfreq-next-for-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux
Pull devfreq next for v6.1 from Chanwoo Choi: "1. Handle -EPROBE_DEFER when regulator is not probed on mtk-ci-devfreq.c 2. Use dev_err_probe to reduce the error log on rockchip-dfi.c" * tag 'devfreq-next-for-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux: PM / devfreq: rockchip-dfi: Fix an error message PM / devfreq: mtk-cci: Handle sram regulator probe deferral
2 parents f76349c + fb2ac84 commit 599618e

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

drivers/devfreq/event/rockchip-dfi.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,9 @@ static int rockchip_dfi_probe(struct platform_device *pdev)
189189
return PTR_ERR(data->regs);
190190

191191
data->clk = devm_clk_get(dev, "pclk_ddr_mon");
192-
if (IS_ERR(data->clk)) {
193-
dev_err(dev, "Cannot get the clk dmc_clk\n");
194-
return PTR_ERR(data->clk);
195-
}
192+
if (IS_ERR(data->clk))
193+
return dev_err_probe(dev, PTR_ERR(data->clk),
194+
"Cannot get the clk pclk_ddr_mon\n");
196195

197196
/* try to find the optional reference to the pmu syscon */
198197
node = of_parse_phandle(np, "rockchip,pmu", 0);

drivers/devfreq/mtk-cci-devfreq.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,13 @@ static int mtk_ccifreq_probe(struct platform_device *pdev)
291291
}
292292

293293
drv->sram_reg = devm_regulator_get_optional(dev, "sram");
294-
if (IS_ERR(drv->sram_reg))
294+
if (IS_ERR(drv->sram_reg)) {
295+
ret = PTR_ERR(drv->sram_reg);
296+
if (ret == -EPROBE_DEFER)
297+
goto out_free_resources;
298+
295299
drv->sram_reg = NULL;
296-
else {
300+
} else {
297301
ret = regulator_enable(drv->sram_reg);
298302
if (ret) {
299303
dev_err(dev, "failed to enable sram regulator\n");

0 commit comments

Comments
 (0)