From b2790eccc0bc755d37ed5cd8d225cec0d72798c8 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Fri, 24 Mar 2023 09:44:04 +0800 Subject: ASoC: codecs: rt711-sdca: simplify set_stream MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230324014408.1677505-10-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown --- sound/soc/codecs/rt711-sdca.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'sound/soc/codecs/rt711-sdca.h') 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 -- cgit