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.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ran jianping <ran.jianping@zte.com.cn>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
platform_set_drvdata(pdev, mdev);
pm_runtime_enable(mdev->dev);
- ret = pm_runtime_get_sync(mdev->dev);
- if (ret < 0) {
- pm_runtime_put_noidle(mdev->dev);
+ ret = pm_runtime_resume_and_get(mdev->dev);
+ if (ret < 0)
goto unregister;
- }
/*
* just print the raw revision register, the format is not