hwspinlock: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
Using pm_runtime_resume_and_get is more appropriate for simplifing code Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20220418105508.2558696-1-chi.minghao@zte.com.cn
This commit is contained in:
parent
ce522ba9ef
commit
0e01d176d5
@ -94,11 +94,9 @@ static int omap_hwspinlock_probe(struct platform_device *pdev)
|
|||||||
* the module SYSSTATUS register
|
* the module SYSSTATUS register
|
||||||
*/
|
*/
|
||||||
pm_runtime_enable(&pdev->dev);
|
pm_runtime_enable(&pdev->dev);
|
||||||
ret = pm_runtime_get_sync(&pdev->dev);
|
ret = pm_runtime_resume_and_get(&pdev->dev);
|
||||||
if (ret < 0) {
|
if (ret < 0)
|
||||||
pm_runtime_put_noidle(&pdev->dev);
|
|
||||||
goto runtime_err;
|
goto runtime_err;
|
||||||
}
|
|
||||||
|
|
||||||
/* Determine number of locks */
|
/* Determine number of locks */
|
||||||
i = readl(io_base + SYSSTATUS_OFFSET);
|
i = readl(io_base + SYSSTATUS_OFFSET);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user