summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt1318-sdw.h
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2023-03-24 04:44:01 +0300
committerMark Brown <broonie@kernel.org>2023-03-29 17:03:03 +0300
commitbe8e5a850eb1780bae360b9b48b6d2ab70e5fb03 (patch)
tree0e3fb2ab48ac7b468ba650e1a5ec4422199d5497 /sound/soc/codecs/rt1318-sdw.h
parent1294d7d71f6abad6299a12cf6911f8e5622c7865 (diff)
downloadlinux-be8e5a850eb1780bae360b9b48b6d2ab70e5fb03.tar.xz
ASoC: codecs: rt1318-sdw: simplify set_stream
Using a dynamic allocation to store a single pointer is not very efficient/useful. Worse, the memory is released in the SoundWire stream.c file, but still accessed in the DAI shutdown, leading to kmemleak reports. And last the API requires the previous stream information to be cleared when the argument is NULL. Simplify the code to address all 3 problems. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230324014408.1677505-7-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt1318-sdw.h')
-rw-r--r--sound/soc/codecs/rt1318-sdw.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/sound/soc/codecs/rt1318-sdw.h b/sound/soc/codecs/rt1318-sdw.h
index 4d7ac9c4bd8d..85918c184f16 100644
--- a/sound/soc/codecs/rt1318-sdw.h
+++ b/sound/soc/codecs/rt1318-sdw.h
@@ -94,8 +94,4 @@ struct rt1318_sdw_priv {
bool first_hw_init;
};
-struct sdw_stream_data {
- struct sdw_stream_runtime *sdw_stream;
-};
-
#endif /* __RT1318_SDW_H__ */