From 394256cfaf2aea0d7dffb72e61673a2ae8d046e7 Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Mon, 16 Dec 2024 09:56:09 +0800 Subject: [PATCH] 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 --- drivers/soundwire/stream.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index 50ebeb048e6e14..d4d69ece79699d 100644 --- a/drivers/soundwire/stream.c +++ b/drivers/soundwire/stream.c @@ -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; @@ -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;