summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-09-01 13:29:14 +0200
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-11 15:57:29 +0200
commit15cd442e79e2a60a725ee5501e4ffb537698c802 (patch)
tree3a4b0356ca704fe66095ffeca6b9dc9a4be8c512 /include/media
parentmedia: v4l2-ctrls: improve media_request_(un)lock_for_update (diff)
downloadlinux-15cd442e79e2a60a725ee5501e4ffb537698c802.tar.xz
linux-15cd442e79e2a60a725ee5501e4ffb537698c802.zip
media: media-request: EPERM -> EACCES/EBUSY
If requests are not supported by the driver, then return EACCES, not EPERM. If you attempt to mix queueing buffers directly and using requests, then EBUSY is returned instead of EPERM: once a specific queueing mode has been chosen the queue is 'busy' if you attempt the other mode (i.e. direct queueing vs via a request). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Tomasz Figa <tfiga@chromium.org> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/media-request.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/media/media-request.h b/include/media/media-request.h
index f0920aa84509..0ce75c35131f 100644
--- a/include/media/media-request.h
+++ b/include/media/media-request.h
@@ -198,7 +198,7 @@ void media_request_put(struct media_request *req);
* Get the request represented by @request_fd that is owned
* by the media device.
*
- * Return a -EPERM error pointer if requests are not supported
+ * Return a -EACCES error pointer if requests are not supported
* by this driver. Return -EINVAL if the request was not found.
* Return the pointer to the request if found: the caller will
* have to call @media_request_put when it finished using the
@@ -231,7 +231,7 @@ static inline void media_request_put(struct media_request *req)
static inline struct media_request *
media_request_get_by_fd(struct media_device *mdev, int request_fd)
{
- return ERR_PTR(-EPERM);
+ return ERR_PTR(-EACCES);
}
#endif