From: Takashi Iwai Date: Thu, 9 Apr 2026 09:38:23 +0000 (+0200) Subject: ALSA: hda/senarytech: Clean up with the new GPIO helper X-Git-Tag: v7.1-rc1~166^2~9^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2938a83a257ca1e3a8e74b385f543d6bd6eab8b;p=thirdparty%2Fkernel%2Flinux.git ALSA: hda/senarytech: Clean up with the new GPIO helper Use the new GPIO helper function to clean up the open code. Merely a code refactoring, and no behavior change. Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20260409093826.1317626-11-tiwai@suse.de --- diff --git a/sound/hda/codecs/senarytech.c b/sound/hda/codecs/senarytech.c index 29b554cdd81d4..3ee8bc0ea3ab5 100644 --- a/sound/hda/codecs/senarytech.c +++ b/sound/hda/codecs/senarytech.c @@ -159,14 +159,8 @@ static void senary_init_gpio_led(struct hda_codec *codec) struct senary_spec *spec = codec->spec; unsigned int mask = spec->gpio_mute_led_mask | spec->gpio_mic_led_mask; - if (mask) { - snd_hda_codec_write(codec, codec->core.afg, 0, AC_VERB_SET_GPIO_MASK, - mask); - snd_hda_codec_write(codec, codec->core.afg, 0, AC_VERB_SET_GPIO_DIRECTION, - mask); - snd_hda_codec_write(codec, codec->core.afg, 0, AC_VERB_SET_GPIO_DATA, - spec->gpio_led); - } + if (mask) + snd_hda_codec_set_gpio(codec, mask, mask, spec->gpio_led, 0); } static int senary_init(struct hda_codec *codec)