aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
authorTakashi Iwai <tiwai@suse.de>2026-06-10 17:45:32 +0200
committerTakashi Iwai <tiwai@suse.de>2026-06-11 09:34:09 +0200
commit2fa8d8b6c18b3443b65d42ced33bc9e36683e886 (patch)
tree5b14a1afe27ff99d18d257531d4fa0ed09525668 /sound
parentdcca9b6064c33c84fbeb9f09814178a206321249 (diff)
downloadath-2fa8d8b6c18b3443b65d42ced33bc9e36683e886.tar.gz
ALSA: core: Use the new helper for the power refcount
Replace the open code for managing the power refcount in the snd_card object with the new helper functions. Only a code cleanup, no functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260610154538.51076-3-tiwai@suse.de
Diffstat (limited to 'sound')
-rw-r--r--sound/core/init.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/core/init.c b/sound/core/init.c
index 2408160b8ea13..ed5af4e0ec105 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -328,8 +328,7 @@ static int snd_card_init(struct snd_card *card, struct device *parent,
mutex_init(&card->memory_mutex);
#ifdef CONFIG_PM
init_waitqueue_head(&card->power_sleep);
- init_waitqueue_head(&card->power_ref_sleep);
- atomic_set(&card->power_ref, 0);
+ snd_refcount_init(&card->power_ref);
#endif
init_waitqueue_head(&card->remove_sleep);
card->sync_irq = -1;