diff mbox series

[4/7] ALSA: control: Minor optimization for SNDRV_CTL_IOCTL_POWER_STATE

Message ID 20210518165201.24376-5-tiwai@suse.de
State Accepted
Commit 968bb2baec60757ae86b4ee937561f5815488044
Headers show
Series ALSA: Prep work for PCI rescan support | expand

Commit Message

Takashi Iwai May 18, 2021, 4:51 p.m. UTC
The SNDRV_CTL_IOCTL_POWER_STATE is an obsoleted ioctl and now
practically it returns always D0.  Do some minor optimization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/core/control.c | 4 ----
 1 file changed, 4 deletions(-)
diff mbox series

Patch

diff --git a/sound/core/control.c b/sound/core/control.c
index 799d91ddccb0..5e8b77855e5d 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -1807,11 +1807,7 @@  static long snd_ctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg
 	case SNDRV_CTL_IOCTL_POWER:
 		return -ENOPROTOOPT;
 	case SNDRV_CTL_IOCTL_POWER_STATE:
-#ifdef CONFIG_PM
-		return put_user(card->power_state, ip) ? -EFAULT : 0;
-#else
 		return put_user(SNDRV_CTL_POWER_D0, ip) ? -EFAULT : 0;
-#endif
 	}
 	down_read(&snd_ioctl_rwsem);
 	list_for_each_entry(p, &snd_control_ioctls, list) {