提交 0bf82a7d 编写于 作者: M Minghao Chi 提交者: Zheng Zengkai

scsi: ufs: Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()

stable inclusion
from stable-v5.10.121
commit 1869f9bfafe1166340205f94c56467bbc7ae613f
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5L6CQ

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1869f9bfafe1166340205f94c56467bbc7ae613f

--------------------------------

[ Upstream commit 75b8715e ]

Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync() and
pm_runtime_put_noidle(). This change is just to simplify the code, no
actual functional changes.

Link: https://lore.kernel.org/r/20220420090353.2588804-1-chi.minghao@zte.com.cnReported-by: NZeal Robot <zealci@zte.com.cn>
Signed-off-by: NMinghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 c25d541b
...@@ -29,11 +29,9 @@ static int ti_j721e_ufs_probe(struct platform_device *pdev) ...@@ -29,11 +29,9 @@ static int ti_j721e_ufs_probe(struct platform_device *pdev)
return PTR_ERR(regbase); return PTR_ERR(regbase);
pm_runtime_enable(dev); pm_runtime_enable(dev);
ret = pm_runtime_get_sync(dev); ret = pm_runtime_resume_and_get(dev);
if (ret < 0) { if (ret < 0)
pm_runtime_put_noidle(dev);
goto disable_pm; goto disable_pm;
}
/* Select MPHY refclk frequency */ /* Select MPHY refclk frequency */
clk = devm_clk_get(dev, NULL); clk = devm_clk_get(dev, NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册