diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2018-01-05 23:55:33 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-02-22 17:42:33 +0300 |
commit | f1a81c0eab38a1cf8887cd10731c77ad547cc17c (patch) | |
tree | ff8677f46e1860484f6f4bc55b37470c04254050 /sound | |
parent | 9a2b3777bd5335e34ec585ecc8e29d575dfc8c13 (diff) | |
download | linux-f1a81c0eab38a1cf8887cd10731c77ad547cc17c.tar.xz |
ASoC: acpi: fix machine driver selection based on quirk
commit 5c256045b87b8aa8e5bc9d2e2fdc0802351c1f99 upstream.
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: 54746dabf770 ('ASoC: Improve machine driver selection based on quirk data')
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96691
Tested-by: Nicole Færber <nicole.faerber@dpin.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/intel/common/sst-match-acpi.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/soc/intel/common/sst-match-acpi.c b/sound/soc/intel/common/sst-match-acpi.c index 56d26f36a3cb..b4a929562218 100644 --- a/sound/soc/intel/common/sst-match-acpi.c +++ b/sound/soc/intel/common/sst-match-acpi.c @@ -83,11 +83,9 @@ struct sst_acpi_mach *sst_acpi_find_machine(struct sst_acpi_mach *machines) for (mach = machines; mach->id[0]; mach++) { if (sst_acpi_check_hid(mach->id) == true) { - if (mach->machine_quirk == NULL) - return mach; - - if (mach->machine_quirk(mach) != NULL) - return mach; + if (mach->machine_quirk) + mach = mach->machine_quirk(mach); + return mach; } } return NULL; |