Skip to content

Commit

Permalink
soundwire: intel: refine function for wakeen event processing
Browse files Browse the repository at this point in the history
if a slave has been attached to a bus, the slave->dev_num_sticky
should be non-zero, so we can check this value to skip the
ghost devices defined in ACPI table but not populated in hardware.

Signed-off-by: Rander Wang <rander.wang@intel.com>
  • Loading branch information
RanderWang authored and plbossart committed Dec 12, 2019
1 parent b49e4ab commit 6fa65e2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/soundwire/intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,13 +473,13 @@ void sdw_intel_process_wakeen_event(struct sdw_intel_ctx *ctx)
* the wakeen event and let codec driver check codec status
*/
list_for_each_entry(slave, &bus->slaves, node) {
if (slave->prop.wake_capable) {
if (slave->status != SDW_SLAVE_ATTACHED &&
slave->status != SDW_SLAVE_ALERT)
continue;

/*
* discard devices that are defined in ACPI tables but
* not physically present and devices that cannot
* generate wakes
*/
if (slave->dev_num_sticky && slave->prop.wake_capable)
pm_request_resume(&slave->dev);
}
}
}
}
Expand Down

0 comments on commit 6fa65e2

Please sign in to comment.