lkml.org 
[lkml]   [2023]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH V6 8/8] soundwire: amd: add pm_prepare callback and pm ops support
From

> +static int amd_resume_child_device(struct device *dev, void *data)
> +{
> + struct sdw_slave *slave = dev_to_sdw_dev(dev);
> + int ret;
> +
> + if (!slave->probed) {
> + dev_dbg(dev, "skipping device, no probed driver\n");
> + return 0;
> + }
> + if (!slave->dev_num_sticky) {
> + dev_dbg(dev, "skipping device, never detected on bus\n");
> + return 0;
> + }
> + if (!pm_runtime_suspended(dev))
> + return 0;
> + ret = pm_request_resume(dev);

I still don't get why the test above was needed. It's racy and brings
limited benefits.

> + if (ret < 0)
> + dev_err(dev, "pm_request_resume failed: %d\n", ret);
> +
> + return ret;
> +}

\
 
 \ /
  Last update: 2023-03-27 00:47    [W:0.077 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site