summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2023-03-28 14:35:31 -0600
committerJens Axboe <axboe@kernel.dk>2023-03-30 08:12:29 -0600
commite4d3202c18329ba2733c9e04489b6ef05d3bce08 (patch)
treed93823d675ce4da75ba0e8e518d862ed2db42655 /sound
parentda67ba07b4aa0a192e2957540eca15f8cb2e1ee7 (diff)
ALSA: pcm: check for user backed iterator, not specific iterator type
In preparation for switching single segment iterators to using ITER_UBUF, swap the check for whether we are user backed or not. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/pcm_native.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 8bb97ee6720d..5868661d461b 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -3531,7 +3531,7 @@ static ssize_t snd_pcm_readv(struct kiocb *iocb, struct iov_iter *to)
if (runtime->state == SNDRV_PCM_STATE_OPEN ||
runtime->state == SNDRV_PCM_STATE_DISCONNECTED)
return -EBADFD;
- if (!iter_is_iovec(to))
+ if (!to->user_backed)
return -EINVAL;
if (to->nr_segs > 1024 || to->nr_segs != runtime->channels)
return -EINVAL;
@@ -3571,7 +3571,7 @@ static ssize_t snd_pcm_writev(struct kiocb *iocb, struct iov_iter *from)
if (runtime->state == SNDRV_PCM_STATE_OPEN ||
runtime->state == SNDRV_PCM_STATE_DISCONNECTED)
return -EBADFD;
- if (!iter_is_iovec(from))
+ if (!from->user_backed)
return -EINVAL;
if (from->nr_segs > 128 || from->nr_segs != runtime->channels ||
!frame_aligned(runtime, iov->iov_len))