author: Libin Yang <libin.yang@intel.com> 2021-12-21 09:08:16 +0800
committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2022-01-05 12:42:33 +0100
commit: cce476954401e3421afafb25bbaa926050688b1d
parent: 62f0a61fcb8a05302d2e5f0433b06f52729a214c
Commit Summary:
Diffstat:
1 file changed, 3 insertions, 2 deletions
diff --git a/sound/hda/intel-sdw-acpi.c b/sound/hda/intel-sdw-acpi.c
index c0123bc31c0d..ba8a872a2901 100644
--- a/sound/hda/intel-sdw-acpi.c
+++ b/sound/hda/intel-sdw-acpi.c
@@ -132,8 +132,6 @@ static acpi_status sdw_intel_acpi_cb(acpi_handle handle, u32 level,
return AE_NOT_FOUND;
}
- info->handle = handle;
-
/*
* On some Intel platforms, multiple children of the HDAS
* device can be found, but only one of them is the SoundWire
@@ -144,6 +142,9 @@ static acpi_status sdw_intel_acpi_cb(acpi_handle handle, u32 level,
if (FIELD_GET(GENMASK(31, 28), adr) != SDW_LINK_TYPE)
return AE_OK; /* keep going */
+ /* found the correct SoundWire controller */
+ info->handle = handle;
+
/* device found, stop namespace walk */
return AE_CTRL_TERMINATE;
}