diff options
| author | Takashi Iwai <tiwai@suse.de> | 2025-08-27 10:28:41 +0300 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2025-08-29 12:52:13 +0300 |
| commit | 5d8c9c987fbdd65677315198c2b1f35a440d7cdf (patch) | |
| tree | 531735d279ccf98baa98d48528c359b8dde49c5d /include/linux | |
| parent | 4ef353d546cda466fc39b7daca558d7bcec21c09 (diff) | |
| download | linux-5d8c9c987fbdd65677315198c2b1f35a440d7cdf.tar.xz | |
ALSA: hda: Introduce auto cleanup macros for PM
The temporary power up/down of the codec via snd_hda_power_up() and
_down() (or snd_hda_power_up_pm() and _down_pm()) is seen in various
places. This patch introduces simple auto-cleanup macros for those
call patterns, so that the drivers don't have to call the
corresponding power-down calls explicitly.
Namely,
err = snd_hda_power_up(codec);
if (err < 0)
return err;
....
snd_power_down(codec);
can drop the *_down() call by replacing with
CLASS(snd_hda_power, pm)(codec);
if (pm.err < 0)
return pm.err;
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-2-tiwai@suse.de
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
