aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.cirrus.com>2025-03-03 17:14:14 +0000
committerMark Brown <broonie@kernel.org>2025-03-03 18:14:47 +0000
commit17ec58ac3c08c5c43bbdf5b08020fa4188a3009a (patch)
tree9f0fe91478812a0070afe697ab38c2184dde3246
parentASoC: rt715: Remove duplicate SOC_DOUBLE_R_EXT() helper macro (diff)
downloadwireguard-linux-17ec58ac3c08c5c43bbdf5b08020fa4188a3009a.tar.xz
wireguard-linux-17ec58ac3c08c5c43bbdf5b08020fa4188a3009a.zip
ASoC: sma1307: Use SOC_SINGLE_EXT() helper macro
Rather than open coding use the helper macro provided by the ASoC core. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250303171424.444556-4-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to '')
-rw-r--r--sound/soc/codecs/sma1307.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sound/soc/codecs/sma1307.c b/sound/soc/codecs/sma1307.c
index 480bcea48541..dac17da9cedd 100644
--- a/sound/soc/codecs/sma1307.c
+++ b/sound/soc/codecs/sma1307.c
@@ -1019,14 +1019,9 @@ static const struct snd_kcontrol_new sma1307_aif_out1_source_control = {
.private_value = (unsigned long)&sma1307_aif_out_source_enum
};
-static const struct snd_kcontrol_new sma1307_sdo_control = {
- .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
- .name = "Switch",
- .info = snd_soc_info_volsw,
- .get = sma1307_dapm_sdo_enable_get,
- .put = sma1307_dapm_sdo_enable_put,
- .private_value = SOC_SINGLE_VALUE(SND_SOC_NOPM, 0, 1, 0, 0)
-};
+static const struct snd_kcontrol_new sma1307_sdo_control =
+ SOC_SINGLE_EXT("Switch", SND_SOC_NOPM, 0, 1, 0,
+ sma1307_dapm_sdo_enable_get, sma1307_dapm_sdo_enable_put);
static const struct snd_kcontrol_new sma1307_enable_control =
SOC_DAPM_SINGLE("Switch", SMA1307_00_SYSTEM_CTRL, 0, 1, 0);