Skip to contentSkip to conversation

soundwire: slave: Don't register devices that are disabled in ACPI

PATCH Applied Charles Keepax 3 participants 3 messages Feb 23 – Feb 25

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soundwire: slave: Don't register devices that are disabled in ACPI

If a piece of hardware is disabled in ACPI it shouldn't be added to the bus. Add code to handle this similar to other buses like SPI/I2C.

---
 drivers/soundwire/slave.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/soundwire/slave.c +3 -0
index f5a3ca3b9dda4..ff763b692078d 100644
@@ -115,6 +115,9 @@ static bool find_slave(struct sdw_bus *bus,
 	u64 addr;
 	int ret;
 
+	if (acpi_bus_get_status(adev) || !acpi_dev_ready_for_enumeration(adev))
+		return false;
+
 	ret = acpi_get_local_u64_address(adev->handle, &addr);
 	if (ret < 0)
 		return false;
Signature · 1 line
2.47.3
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Charles Keepax

If a piece of hardware is disabled in ACPI it shouldn't be added to the bus. Add code to handle this similar to other buses like SPI/I2C.

Makes sense!

Quoted 18 lines
---
 drivers/soundwire/slave.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/soundwire/slave.c +3 -0
index f5a3ca3b9dda4..ff763b692078d 100644
@@ -115,6 +115,9 @@ static bool find_slave(struct sdw_bus *bus,
 	u64 addr;
 	int ret;
 
+	if (acpi_bus_get_status(adev) || !acpi_dev_ready_for_enumeration(adev))
+		return false;
+
 	ret = acpi_get_local_u64_address(adev->handle, &addr);
 	if (ret < 0)
 		return false;
maintainer Applied
#2 lore raw
In reply to Charles Keepax
Quoted 4 lines · Charles Keepax

If a piece of hardware is disabled in ACPI it shouldn't be added to the bus. Add code to handle this similar to other buses like SPI/I2C.

Applied, thanks!

[1/1] soundwire: slave: Don't register devices that are disabled in ACPI

      commit: de67b4ea168f01dac24e328aab6be0802a5c96f6

Best regards,

Signature · 1 line
~Vinod