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>
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;