diff options
author | Mark Brown <broonie@kernel.org> | 2018-01-18 14:55:25 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-01-18 14:55:25 +0300 |
commit | ec49e8164f088917ae800ce061d9e93efae6934c (patch) | |
tree | 1161bc565777ca43e05477038b6a46fbd1c3e259 | |
parent | a8750ddca918032d6349adbf9a4b6555e7db20da (diff) | |
parent | 845ab40092601630ec9eb58398a53b9a87b6900b (diff) | |
download | linux-ec49e8164f088917ae800ce061d9e93efae6934c.tar.xz |
Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus
-rw-r--r-- | include/sound/soc-acpi-intel-match.h | 1 | ||||
-rw-r--r-- | include/sound/soc-acpi.h | 1 | ||||
-rw-r--r-- | sound/soc/intel/skylake/skl-nhlt.c | 3 | ||||
-rw-r--r-- | sound/soc/soc-acpi.c | 8 |
4 files changed, 7 insertions, 6 deletions
diff --git a/include/sound/soc-acpi-intel-match.h b/include/sound/soc-acpi-intel-match.h index 1a9191cd4bb3..9da6388c20a1 100644 --- a/include/sound/soc-acpi-intel-match.h +++ b/include/sound/soc-acpi-intel-match.h @@ -16,6 +16,7 @@ #ifndef __LINUX_SND_SOC_ACPI_INTEL_MATCH_H #define __LINUX_SND_SOC_ACPI_INTEL_MATCH_H +#include <linux/module.h> #include <linux/stddef.h> #include <linux/acpi.h> diff --git a/include/sound/soc-acpi.h b/include/sound/soc-acpi.h index a7d8d335b043..a93436089bf5 100644 --- a/include/sound/soc-acpi.h +++ b/include/sound/soc-acpi.h @@ -17,6 +17,7 @@ #include <linux/stddef.h> #include <linux/acpi.h> +#include <linux/mod_devicetable.h> struct snd_soc_acpi_package_context { char *name; /* package name */ diff --git a/sound/soc/intel/skylake/skl-nhlt.c b/sound/soc/intel/skylake/skl-nhlt.c index 3eaac41090ca..26b0a5caea5a 100644 --- a/sound/soc/intel/skylake/skl-nhlt.c +++ b/sound/soc/intel/skylake/skl-nhlt.c @@ -43,7 +43,8 @@ struct nhlt_acpi_table *skl_nhlt_init(struct device *dev) obj = acpi_evaluate_dsm(handle, &osc_guid, 1, 1, NULL); if (obj && obj->type == ACPI_TYPE_BUFFER) { nhlt_ptr = (struct nhlt_resource_desc *)obj->buffer.pointer; - nhlt_table = (struct nhlt_acpi_table *) + if (nhlt_ptr->length) + nhlt_table = (struct nhlt_acpi_table *) memremap(nhlt_ptr->min_addr, nhlt_ptr->length, MEMREMAP_WB); ACPI_FREE(obj); diff --git a/sound/soc/soc-acpi.c b/sound/soc/soc-acpi.c index f21df28bc28e..d4dd2efea45e 100644 --- a/sound/soc/soc-acpi.c +++ b/sound/soc/soc-acpi.c @@ -84,11 +84,9 @@ snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines) for (mach = machines; mach->id[0]; mach++) { if (snd_soc_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; |