Commit 7827d669 authored by Naveen M's avatar Naveen M Committed by Mark Brown

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: default avatarNaveen M <naveen.m@intel.com>
Signed-off-by: default avatarSubhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 915ae2b9
...@@ -303,8 +303,6 @@ static int sst_acpi_probe(struct platform_device *pdev) ...@@ -303,8 +303,6 @@ static int sst_acpi_probe(struct platform_device *pdev)
dev_err(dev, "No matching machine driver found\n"); dev_err(dev, "No matching machine driver found\n");
return -ENODEV; return -ENODEV;
} }
if (mach->machine_quirk)
mach = mach->machine_quirk(mach);
pdata = mach->pdata; pdata = mach->pdata;
......
...@@ -81,9 +81,15 @@ struct sst_acpi_mach *sst_acpi_find_machine(struct sst_acpi_mach *machines) ...@@ -81,9 +81,15 @@ struct sst_acpi_mach *sst_acpi_find_machine(struct sst_acpi_mach *machines)
{ {
struct sst_acpi_mach *mach; struct sst_acpi_mach *mach;
for (mach = machines; mach->id[0]; mach++) for (mach = machines; mach->id[0]; mach++) {
if (sst_acpi_check_hid(mach->id) == true) if (sst_acpi_check_hid(mach->id) == true) {
return mach; if (mach->machine_quirk == NULL)
return mach;
if (mach->machine_quirk(mach) != NULL)
return mach;
}
}
return NULL; return NULL;
} }
EXPORT_SYMBOL_GPL(sst_acpi_find_machine); EXPORT_SYMBOL_GPL(sst_acpi_find_machine);
......
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