ASoC: amd: ps: fix for acp_lock access in pdm driver
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>
Thu, 25 May 2023 11:29:55 +0000 (16:59 +0530)
committerMark Brown <broonie@kernel.org>
Tue, 30 May 2023 12:43:27 +0000 (13:43 +0100)
commitb6b5c6426efe27cbd954409a50604d99c79bd42b
treef02036e66d52fca3926d239cbb7cb2e8fd865052
parent8938f75a5e35c597a647c28984a0304da7a33d63
ASoC: amd: ps: fix for acp_lock access in pdm driver

Sending the mutex address(acp_lock) as platform
data during ACP PDM platform driver register sequence,
its creating copy of the platform data.
Referencing this platform data in ACP PDM driver results
incorrect reference to the common lock usage.

Instead of directly passing the lock address as platform
data, retrieve it from parent driver data structure
and use the same lock reference in ACP PDM driver.

Fixes: 45aa83cb9388 ("ASoC: amd: ps: use acp_lock to protect common registers in pdm driver")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230525113000.1290758-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/ps/pci-ps.c
sound/soc/amd/ps/ps-pdm-dma.c