]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
soundwire: slave: Don't register devices that are disabled in ACPI
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Mon, 23 Feb 2026 09:20:48 +0000 (09:20 +0000)
committerVinod Koul <vkoul@kernel.org>
Wed, 25 Feb 2026 07:53:15 +0000 (13:23 +0530)
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.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20260223092048.3695135-1-ckeepax@opensource.cirrus.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/slave.c

index f5a3ca3b9dda4417d4ccbad29ddaf0d04dafe7ec..ff763b692078dbeb5d03b6cae71575133ab225fd 100644 (file)
@@ -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;