]> www.infradead.org Git - users/hch/misc.git/commitdiff
ALSA: hda/realtek: Use cleanup macros for PM controls
authorTakashi Iwai <tiwai@suse.de>
Wed, 27 Aug 2025 07:28:44 +0000 (09:28 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 29 Aug 2025 09:52:14 +0000 (11:52 +0200)
The new macro CLASS(snd_hda_power_pm) can replace the manual
snd_hda_power_up_pm() and _down() calls gracefully.

Merely code cleanups and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-5-tiwai@suse.de
sound/hda/codecs/realtek/alc269.c

index 0323606b3d6d9b0c283b5bd86a4334b01f54bf26..e2e65845d329c54ff052f31d8614c1399baee4f4 100644 (file)
@@ -1224,9 +1224,8 @@ static void alc_update_vref_led(struct hda_codec *codec, hda_nid_t pin,
        pinval &= ~AC_PINCTL_VREFEN;
        pinval |= on ? AC_PINCTL_VREF_80 : AC_PINCTL_VREF_HIZ;
        /* temporarily power up/down for setting VREF */
-       snd_hda_power_up_pm(codec);
+       CLASS(snd_hda_power_pm, pm)(codec);
        snd_hda_set_pin_ctl_cache(codec, pin, pinval);
-       snd_hda_power_down_pm(codec);
 }
 
 /* update mute-LED according to the speaker mute state via mic VREF pin */