diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2023-03-24 09:44:04 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-03-29 15:03:06 +0100 |
commit | b2790eccc0bc755d37ed5cd8d225cec0d72798c8 (patch) | |
tree | 757e31c4e88f8c2f84a0a1b14e5fbc69585a725c /sound/soc/codecs/rt711-sdca.h | |
parent | fa55b31fb65347ceab617af7541f0a31b53901f1 (diff) |
ASoC: codecs: rt711-sdca: 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-10-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt711-sdca.h')
-rw-r--r-- | sound/soc/codecs/rt711-sdca.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/sound/soc/codecs/rt711-sdca.h b/sound/soc/codecs/rt711-sdca.h index 10e3c801b813..22076f268577 100644 --- a/sound/soc/codecs/rt711-sdca.h +++ b/sound/soc/codecs/rt711-sdca.h @@ -36,10 +36,6 @@ struct rt711_sdca_priv { bool fu1e_dapm_mute, fu1e_mixer_l_mute, fu1e_mixer_r_mute; }; -struct sdw_stream_data { - struct sdw_stream_runtime *sdw_stream; -}; - /* NID */ #define RT711_AUDIO_FUNCTION_GROUP 0x01 #define RT711_DAC_OUT2 0x03 |