summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/common/sst-match-acpi.c
diff options
context:
space:
mode:
authorNaveen M2017-05-15 10:12:14 +0200
committerMark Brown2017-05-24 19:27:43 +0200
commit7827d66946ad3af734ed46d1d68c23fa6974595c (patch)
treea820e4791cfa3ccd3fd1c3493c7287ecf0c557dc /sound/soc/intel/common/sst-match-acpi.c
parentASoC: Intel: Create a helper to search for matching machine (diff)
downloadkernel-qcow2-linux-7827d66946ad3af734ed46d1d68c23fa6974595c.tar.gz
kernel-qcow2-linux-7827d66946ad3af734ed46d1d68c23fa6974595c.tar.xz
kernel-qcow2-linux-7827d66946ad3af734ed46d1d68c23fa6974595c.zip
ASoC: Move quirk to identify correct machine driver
sst_acpi_mach has a quirk field to handle board specific quirks. Patch moves quirk call to sst_acpi_find_machine() instead of calling it in respective driver Signed-off-by: Naveen M <naveen.m@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/common/sst-match-acpi.c')
-rw-r--r--sound/soc/intel/common/sst-match-acpi.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sound/soc/intel/common/sst-match-acpi.c b/sound/soc/intel/common/sst-match-acpi.c
index f4af3d144b82..88e4977578b5 100644
--- a/sound/soc/intel/common/sst-match-acpi.c
+++ b/sound/soc/intel/common/sst-match-acpi.c
@@ -81,9 +81,15 @@ struct sst_acpi_mach *sst_acpi_find_machine(struct sst_acpi_mach *machines)
{
struct sst_acpi_mach *mach;
- for (mach = machines; mach->id[0]; mach++)
- if (sst_acpi_check_hid(mach->id) == true)
- return mach;
+ 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;
+ }
+ }
return NULL;
}
EXPORT_SYMBOL_GPL(sst_acpi_find_machine);