]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ALSA: hda/sigmatel: Clean up with the new GPIO helper
authorTakashi Iwai <tiwai@suse.de>
Thu, 9 Apr 2026 09:38:19 +0000 (11:38 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 9 Apr 2026 10:05:54 +0000 (12:05 +0200)
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 <tiwai@suse.de>
Link: https://patch.msgid.link/20260409093826.1317626-7-tiwai@suse.de
sound/hda/codecs/sigmatel.c

index 4ff80a65168fdbd8c039871c255b277cbd2d2567..ee3bd21adc366a285688a7a5f09ded0371cb5c8c 100644 (file)
@@ -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 */