Skip to content

Commit 0da4cb4

Browse files
committed
fixup! Soundwire: stream: program BUSCLOCK_SCALE
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>
1 parent 2b55d42 commit 0da4cb4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/soundwire/stream.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,8 @@ static int sdw_program_params(struct sdw_bus *bus, bool prepare)
643643

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

664+
if (!slave->dev_num_sticky)
665+
continue;
662666
scale_index = sdw_slave_get_scale_index(slave, &base);
663667
if (scale_index < 0)
664668
return scale_index;

0 commit comments

Comments
 (0)