]> git.baikalelectronics.ru Git - kernel.git/commitdiff
scsi: ufs: Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()
authorMinghao Chi <chi.minghao@zte.com.cn>
Wed, 20 Apr 2022 09:03:52 +0000 (09:03 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 27 Apr 2022 02:24:27 +0000 (22:24 -0400)
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>
drivers/scsi/ufs/ti-j721e-ufs.c

index eafe0db98d5423de9d064aff54841859d50f1f44..122d650d08102f8ca65ee9b04e072120b0705023 100644 (file)
@@ -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);