summaryrefslogtreecommitdiff
path: root/sound/soc/sof/sof-audio.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2021-12-15 21:04:01 +0300
committerMark Brown <broonie@kernel.org>2021-12-16 01:16:44 +0300
commitdd2fef982ff75fbae618cc274fda09bd40582acd (patch)
treea1e82b5dc5f4063c80646e157cb0b3478643aeb3 /sound/soc/sof/sof-audio.c
parent9182f3c40b52ebd91d4796d96186ba10b720b4ba (diff)
downloadlinux-dd2fef982ff75fbae618cc274fda09bd40582acd.tar.xz
ASoC: SOF: sof-audio: Drop the `cmd` member from struct snd_sof_control
There is no need to use two variables to store and check the same information, the scontrol->cmd is the same as scontrol->control_data->cmd. Drop the former one and when it is needed, access the cmd from the control_data. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20211215180404.53254-6-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/sof-audio.c')
-rw-r--r--sound/soc/sof/sof-audio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/sof/sof-audio.c b/sound/soc/sof/sof-audio.c
index 269eca26eab9..4530c6ed34e0 100644
--- a/sound/soc/sof/sof-audio.c
+++ b/sound/soc/sof/sof-audio.c
@@ -21,7 +21,7 @@ static int sof_kcontrol_setup(struct snd_sof_dev *sdev, struct snd_sof_control *
scontrol->readback_offset = 0;
/* notify DSP of kcontrol values */
- switch (scontrol->cmd) {
+ switch (scontrol->control_data->cmd) {
case SOF_CTRL_CMD_VOLUME:
case SOF_CTRL_CMD_ENUM:
case SOF_CTRL_CMD_SWITCH: