aboutsummaryrefslogtreecommitdiff
path: root/sound/core
diff options
context:
space:
mode:
authorCharles Keepax2016-05-04 14:59:08 +0100
committerTakashi Iwai2016-05-09 17:35:14 +0200
commit0b92b0cdbe419575b2233c08192b2ad28e7dbcfa (patch)
treeb6d1ed7f1186bfbe7c9a0a6fea6699380f0fe87e /sound/core
parente099aeea639ce491d3cd1c3802fe34d98045ffd8 (diff)
ALSA: compress: Use snd_compr_get_poll on error path
We have a function that returns the appropriate flags for the stream direction, so we should use it. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/compress_offload.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index a9933c07a6bf..5268546d6935 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -421,10 +421,7 @@ static unsigned int snd_compr_poll(struct file *f, poll_table *wait)
retval = snd_compr_get_poll(stream);
break;
default:
- if (stream->direction == SND_COMPRESS_PLAYBACK)
- retval = POLLOUT | POLLWRNORM | POLLERR;
- else
- retval = POLLIN | POLLRDNORM | POLLERR;
+ retval = snd_compr_get_poll(stream) | POLLERR;
break;
}
out: