From eea3dd4f1247aa8654194fb19ade22c94c42e41a Mon Sep 17 00:00:00 2001 From: Mengdong Lin Date: Fri, 25 Nov 2016 16:09:17 +0800 Subject: ASoC: topology: Only free TLV for volume mixers of a widget This patch will check the type of embedded controls for a widget, and only free the TLV of volume mixers. Bytes controls don't have TLV. Just free the private value which is used as struct soc_mixer_control for volume mixers or soc_bytes_ext for bytes controls. No need to cast to these types before freeing it. Signed-off-by: Mengdong Lin Signed-off-by: Mark Brown --- include/sound/soc-topology.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/sound/soc-topology.h') diff --git a/include/sound/soc-topology.h b/include/sound/soc-topology.h index b897b9d63161..f9cc7b9271ac 100644 --- a/include/sound/soc-topology.h +++ b/include/sound/soc-topology.h @@ -53,7 +53,7 @@ struct snd_soc_dobj_control { /* dynamic widget object */ struct snd_soc_dobj_widget { - unsigned int kcontrol_enum:1; /* this widget is an enum kcontrol */ + unsigned int kcontrol_type; /* kcontrol type: mixer, enum, bytes */ }; /* generic dynamic object - all dynamic objects belong to this struct */ -- cgit