Skip to content

Commit

Permalink
fixup! Soundwire: stream: program BUSCLOCK_SCALE
Browse files Browse the repository at this point in the history
A Peripheral will be added to the bus->slaves list if it is in the
ACPI table. However, the Peripheral may not actaully exist. We need
to skip the Peripherals that are not exist.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
  • Loading branch information
bardliao committed Dec 16, 2024
1 parent 89772eb commit 394256c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/soundwire/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,8 @@ static int sdw_program_params(struct sdw_bus *bus, bool prepare)

/* Check if all Peripherals comply with SDCA */
list_for_each_entry(slave, &bus->slaves, node) {
if (!slave->dev_num_sticky)
continue;
if (!is_clock_scaling_supported_by_slave(slave)) {
dev_dbg(&slave->dev, "The Peripheral doesn't comply with SDCA\n");
goto manager_runtime;
Expand All @@ -659,6 +661,8 @@ static int sdw_program_params(struct sdw_bus *bus, bool prepare)
int scale_index;
u8 base;

if (!slave->dev_num_sticky)
continue;
scale_index = sdw_slave_get_scale_index(slave, &base);
if (scale_index < 0)
return scale_index;
Expand Down

0 comments on commit 394256c

Please sign in to comment.