diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-05-23 11:09:17 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-05-25 08:48:49 +0200 |
commit | 73063cd3236e8b17e530c491b1d265ff56f1fa79 (patch) | |
tree | 2eb115589d88cfa2efbc5a0f017b4afc06994e95 /sound/core/control.c | |
parent | e94fdbd7b25d87e64688bb109e2c550217a4c879 (diff) | |
download | linux-stable-73063cd3236e8b17e530c491b1d265ff56f1fa79.tar.gz linux-stable-73063cd3236e8b17e530c491b1d265ff56f1fa79.tar.bz2 linux-stable-73063cd3236e8b17e530c491b1d265ff56f1fa79.zip |
ALSA: control: Drop superfluous snd_power_wait() calls
Now we have more fine-grained power controls in each kcontrol ops, the
coarse checks of snd_power_wait() in a few control ioctls became
superfluous. Let's drop them.
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20210523090920.15345-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/control.c')
-rw-r--r-- | sound/core/control.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/sound/core/control.c b/sound/core/control.c index 638da34605ba..7fe901384c9c 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -1045,9 +1045,6 @@ static int snd_ctl_elem_info_user(struct snd_ctl_file *ctl, if (copy_from_user(&info, _info, sizeof(info))) return -EFAULT; - result = snd_power_wait(ctl->card, SNDRV_CTL_POWER_D0); - if (result < 0) - return result; result = snd_ctl_elem_info(ctl, &info); if (result < 0) return result; @@ -1119,10 +1116,6 @@ static int snd_ctl_elem_read_user(struct snd_card *card, if (IS_ERR(control)) return PTR_ERR(control); - result = snd_power_wait(card, SNDRV_CTL_POWER_D0); - if (result < 0) - goto error; - down_read(&card->controls_rwsem); result = snd_ctl_elem_read(card, control); up_read(&card->controls_rwsem); @@ -1192,10 +1185,6 @@ static int snd_ctl_elem_write_user(struct snd_ctl_file *file, return PTR_ERR(control); card = file->card; - result = snd_power_wait(card, SNDRV_CTL_POWER_D0); - if (result < 0) - goto error; - result = snd_ctl_elem_write(card, file, control); if (result < 0) goto error; |