aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2016-05-04 09:59:08 -0400
committerTakashi Iwai <tiwai@suse.de>2016-05-09 11:35:14 -0400
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)
421 retval = snd_compr_get_poll(stream); 421 retval = snd_compr_get_poll(stream);
422 break; 422 break;
423 default: 423 default:
424 if (stream->direction == SND_COMPRESS_PLAYBACK) 424 retval = snd_compr_get_poll(stream) | POLLERR;
425 retval = POLLOUT | POLLWRNORM | POLLERR;
426 else
427 retval = POLLIN | POLLRDNORM | POLLERR;
428 break; 425 break;
429 } 426 }
430out: 427out: