Commit 5c256045 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: acpi: fix machine driver selection based on quirk

The ACPI/machine-driver code refactoring introduced in 4.13 introduced
a regression for cases where we need a DMI-based quirk to select the
machine driver (the BIOS reports an invalid HID). The fix is just to
make sure the results of the quirk are actually used.

Fixes: 54746dab ('ASoC: Improve machine driver selection based on quirk data')
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96691Tested-by: default avatarNicole Færber <nicole.faerber@dpin.de>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
parent 20a1ea22
...@@ -84,10 +84,8 @@ snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines) ...@@ -84,10 +84,8 @@ snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines)
for (mach = machines; mach->id[0]; mach++) { for (mach = machines; mach->id[0]; mach++) {
if (snd_soc_acpi_check_hid(mach->id) == true) { if (snd_soc_acpi_check_hid(mach->id) == true) {
if (mach->machine_quirk == NULL) if (mach->machine_quirk)
return mach; mach = mach->machine_quirk(mach);
if (mach->machine_quirk(mach) != NULL)
return mach; return mach;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment