Skip to content

Commit

Permalink
scsi: ufs: Use pm_runtime_resume_and_get() instead of pm_runtime_get_…
Browse files Browse the repository at this point in the history
…sync()

[ Upstream commit 75b8715 ]

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.cn
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Minghao Chi authored and gregkh committed Jun 9, 2022
1 parent 0610903 commit 8cc58ee
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/scsi/ufs/ti-j721e-ufs.c
Expand Up @@ -29,11 +29,9 @@ static int ti_j721e_ufs_probe(struct platform_device *pdev)
return PTR_ERR(regbase);

pm_runtime_enable(dev);
ret = pm_runtime_get_sync(dev);
if (ret < 0) {
pm_runtime_put_noidle(dev);
ret = pm_runtime_resume_and_get(dev);
if (ret < 0)
goto disable_pm;
}

/* Select MPHY refclk frequency */
clk = devm_clk_get(dev, NULL);
Expand Down

0 comments on commit 8cc58ee

Please sign in to comment.