Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: mxs: using pm_runtime_resume_and_get instead of pm_runtime_get_sync

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: Minghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220420090420.2588868-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Minghao Chi and committed by
Mark Brown
32831bf5 7d34ff58

+1 -2
+1 -2
drivers/spi/spi-mxs.c
··· 605 605 } 606 606 } 607 607 608 - ret = pm_runtime_get_sync(ssp->dev); 608 + ret = pm_runtime_resume_and_get(ssp->dev); 609 609 if (ret < 0) { 610 - pm_runtime_put_noidle(ssp->dev); 611 610 dev_err(ssp->dev, "runtime_get_sync failed\n"); 612 611 goto out_pm_runtime_disable; 613 612 }