linux-stable/include
Hans de Goede 28c916ade1
ASoC: soc-acpi: Set mach->id field on comp_ids matches
Commit dac7cbd55d ("ASoC: Intel: soc-acpi-byt: shrink tables using
compatible IDs") and commit 959ae8215a ("ASoC: Intel: soc-acpi-cht:
shrink tables using compatible IDs") simplified the match tables in
soc-acpi-intel-byt-match.c and soc-acpi-intel-cht-match.c by merging
identical entries using the new .comp_ids snd_soc_acpi_mach field to
point a single entry to multiple ACPI HIDs and clearing the previously
unique per entry .id field.

But various machine drivers from sound/soc/intel/boards rely on mach->id
in one or more ways, e.g. some drivers contain the following snippets:

	adev = acpi_dev_get_first_match_dev(mach->id, NULL, -1);

	pkg_found = snd_soc_acpi_find_package_from_hid(mach->id, ...

	if (!strncmp(snd_soc_cards[i].codec_id, mach->id, 8)) { ...

All of which are broken by the match table shrinking.

Make the snd_soc_acpi_mach.id field non const (the storage for the tables
already is non const) and on a comps_ids match copy the matching HID to
the id field to fix this.

Fixes: dac7cbd55d ("ASoC: Intel: soc-acpi-byt: shrink tables using compatible IDs")
Fixes: 959ae8215a ("ASoC: Intel: soc-acpi-cht: shrink tables using compatible IDs")
Suggested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Brent Lu <brent.lu@intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20211118153014.349222-1-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-22 15:40:01 +00:00
..
acpi Revert "ACPI: Add memory semantics to acpi_os_map_memory()" 2021-09-23 20:39:36 +02:00
asm-generic asm-generic: build fixes for v5.15 2021-10-08 11:57:54 -07:00
clocksource
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2021-08-30 12:57:10 -07:00
drm
dt-bindings ASoC: dt-bindings: rename q6afe.h to q6dsp-lpass-ports.h 2021-10-26 13:49:57 +01:00
keys
kunit kunit: fix kernel-doc warnings due to mismatched arg names 2021-10-06 17:54:07 -06:00
kvm KVM: arm64: Fix PMU probe ordering 2021-09-20 12:43:34 +01:00
linux v5.15-rc1 + 20210927135559.738-[23456]-srinivas.kandagatla@linaro.org 2021-10-26 13:49:25 +01:00
math-emu
media
memory
misc
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf 2021-10-02 13:55:02 +01:00
pcmcia
ras
rdma Merge branch 'sg_nents' into rdma.git for-next 2021-08-30 09:49:59 -03:00
scsi scsi: core: Remove 'current_tag' 2021-09-22 00:13:38 -04:00
soc net: dsa: tag_ocelot_8021q: break circular dependency with ocelot switch lib 2021-10-12 17:35:18 -07:00
sound ASoC: soc-acpi: Set mach->id field on comp_ids matches 2021-11-22 15:40:01 +00:00
target
trace block-5.15-2021-10-17 2021-10-17 19:25:20 -10:00
uapi ASoC: qdsp6: audioreach: add topology support 2021-10-26 13:50:07 +01:00
vdso
video
xen xen/privcmd: drop "pages" parameter from xen_remap_pfn() 2021-10-05 08:20:27 +02:00