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

soundwire: intel_auxdevice: use pm_runtime_resume() instead of pm_request_resume()

We need to wait for each child to fully resume. pm_request_resume() is
asynchronous, what we need is to wait synchronously to avoid race
conditions.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20240410023438.487017-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Bard Liao and committed by
Vinod Koul
6f4867fa 62707b56

+4 -4
+4 -4
drivers/soundwire/intel_auxdevice.c
··· 454 454 return 0; 455 455 } 456 456 457 - ret = pm_request_resume(dev); 457 + ret = pm_runtime_resume(dev); 458 458 if (ret < 0) { 459 - dev_err(dev, "%s: pm_request_resume failed: %d\n", __func__, ret); 459 + dev_err(dev, "%s: pm_runtime_resume failed: %d\n", __func__, ret); 460 460 return ret; 461 461 } 462 462 ··· 499 499 * first resume the device for this link. This will also by construction 500 500 * resume the PCI parent device. 501 501 */ 502 - ret = pm_request_resume(dev); 502 + ret = pm_runtime_resume(dev); 503 503 if (ret < 0) { 504 - dev_err(dev, "%s: pm_request_resume failed: %d\n", __func__, ret); 504 + dev_err(dev, "%s: pm_runtime_resume failed: %d\n", __func__, ret); 505 505 return 0; 506 506 } 507 507