aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/intel/boards/sof_sdw_common.h
diff options
context:
space:
mode:
authorGravatar Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> 2020-07-17 16:13:33 -0500
committerGravatar Mark Brown <broonie@kernel.org> 2020-07-20 16:08:20 +0100
commitcf0418cd06ce42fcf35beb33e315b5a77e596926 (patch)
treee62fe1102e44700b4a1848390dfdc2b1e5b2c5d0 /sound/soc/intel/boards/sof_sdw_common.h
parentASoC: Intel: sof_sdw_rt711: remove hard-coded codec name (diff)
downloadlinux-cf0418cd06ce42fcf35beb33e315b5a77e596926.tar.gz
linux-cf0418cd06ce42fcf35beb33e315b5a77e596926.tar.bz2
linux-cf0418cd06ce42fcf35beb33e315b5a77e596926.zip
ASoC: Intel: sof_sdw_rt711: remove properties in card remove
The rt711 jack detection properties are set from the machine drivers during the card probe, as done in other ASoC examples. KASAN reports a use-after-free error when unbinding drivers due to a confusing sequence between the ACPI core, the device core and the SoundWire device cleanups. Rather than fixing this sequence, follow the recommendation to have the same caller add and remove properties, add an explicit device_remove_properties() in the card .remove() callback. In future patches the use of device_add/remove_properties will be replaced by a direct handling of a swnode, but the sequence will remain the same. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200717211337.31956-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards/sof_sdw_common.h')
-rw-r--r--sound/soc/intel/boards/sof_sdw_common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h
index 426017626b16..c64c5d801d26 100644
--- a/sound/soc/intel/boards/sof_sdw_common.h
+++ b/sound/soc/intel/boards/sof_sdw_common.h
@@ -91,6 +91,7 @@ int sof_sdw_rt711_init(const struct snd_soc_acpi_link_adr *link,
struct snd_soc_dai_link *dai_links,
struct sof_sdw_codec_info *info,
bool playback);
+int sof_sdw_rt711_exit(struct device *dev, struct snd_soc_dai_link *dai_link);
/* RT700 support */
int sof_sdw_rt700_init(const struct snd_soc_acpi_link_adr *link,