Skip to content

Commit

Permalink
soc: ti: knav_dma: Use pm_runtime_resume_and_get instead of pm_runtim…
Browse files Browse the repository at this point in the history
…e_get_sync

Using pm_runtime_resume_and_get is more appropriate
for simplifying code.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Link: https://lore.kernel.org/r/20220412082923.2532649-1-chi.minghao@zte.com.cn
  • Loading branch information
Minghao Chi authored and Nishanth Menon committed Apr 15, 2022
1 parent a6af504 commit d3e3116
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/soc/ti/knav_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -745,9 +745,8 @@ static int knav_dma_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&kdev->list);

pm_runtime_enable(kdev->dev);
ret = pm_runtime_get_sync(kdev->dev);
ret = pm_runtime_resume_and_get(kdev->dev);
if (ret < 0) {
pm_runtime_put_noidle(kdev->dev);
dev_err(kdev->dev, "unable to enable pktdma, err %d\n", ret);
goto err_pm_disable;
}
Expand Down

0 comments on commit d3e3116

Please sign in to comment.