From: Takashi Iwai Date: Thu, 9 Apr 2026 09:38:19 +0000 (+0200) Subject: ALSA: hda/sigmatel: Clean up with the new GPIO helper X-Git-Tag: v7.1-rc1~166^2~9^2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37e4fccc21aa0e812d77e3e3f7b8373475ee3715;p=thirdparty%2Fkernel%2Flinux.git ALSA: hda/sigmatel: 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-7-tiwai@suse.de --- diff --git a/sound/hda/codecs/sigmatel.c b/sound/hda/codecs/sigmatel.c index 4ff80a65168fd..ee3bd21adc366 100644 --- a/sound/hda/codecs/sigmatel.c +++ b/sound/hda/codecs/sigmatel.c @@ -309,15 +309,7 @@ static void stac_gpio_set(struct hda_codec *codec, unsigned int mask, /* Configure GPIOx as CMOS */ snd_hda_codec_write(codec, fg, 0, 0x7e7, 0); - snd_hda_codec_write(codec, fg, 0, - AC_VERB_SET_GPIO_MASK, gpiomask); - snd_hda_codec_write_sync(codec, fg, 0, - AC_VERB_SET_GPIO_DIRECTION, gpiodir); /* sync */ - - msleep(1); - - snd_hda_codec_write_sync(codec, fg, 0, - AC_VERB_SET_GPIO_DATA, gpiostate); /* sync */ + snd_hda_codec_set_gpio(codec, gpiomask, gpiodir, gpiostate, 1); } /* hook for controlling mic-mute LED GPIO */