summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorHans Verkuil <hansverk@cisco.com>2018-05-11 05:32:24 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-05-28 16:31:44 -0400
commit73a110623e7b7592defea69f028cccae495d69a4 (patch)
tree9b1c21779d0317c9d18715cb9ce7197e8f2e0117 /include/media
parenteba09b5b3dfb1b79db4428b6f379f68db4b62056 (diff)
downloadlinux-stable-73a110623e7b7592defea69f028cccae495d69a4.tar.gz
linux-stable-73a110623e7b7592defea69f028cccae495d69a4.tar.bz2
linux-stable-73a110623e7b7592defea69f028cccae495d69a4.zip
media: v4l2-core: push taking ioctl mutex down to ioctl handler
The ioctl serialization mutex (vdev->lock or q->lock for vb2 queues) was taken at the highest level in v4l2-dev.c. This prevents more fine-grained locking since at that level we cannot examine the ioctl arguments, we can only do that after video_usercopy is called. So push the locking down to __video_do_ioctl() and subdev_do_ioctl_lock(). This also allows us to make a few functions in v4l2-ioctl.c static and video_usercopy() is no longer exported. The locking scheme is not changed by this patch, just pushed down. Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/v4l2-dev.h9
-rw-r--r--include/media/v4l2-ioctl.h12
2 files changed, 0 insertions, 21 deletions
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index 30423aefe7c5..456ac13eca1d 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -436,15 +436,6 @@ void video_device_release(struct video_device *vdev);
void video_device_release_empty(struct video_device *vdev);
/**
- * v4l2_is_known_ioctl - Checks if a given cmd is a known V4L ioctl
- *
- * @cmd: ioctl command
- *
- * returns true if cmd is a known V4L2 ioctl
- */
-bool v4l2_is_known_ioctl(unsigned int cmd);
-
-/**
* v4l2_disable_ioctl- mark that a given command isn't implemented.
* shouldn't use core locking
*
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h
index a7b3f7c75d62..a8dbf5b54b5c 100644
--- a/include/media/v4l2-ioctl.h
+++ b/include/media/v4l2-ioctl.h
@@ -658,18 +658,6 @@ void v4l_printk_ioctl(const char *prefix, unsigned int cmd);
struct video_device;
-
-/**
- * v4l2_ioctl_get_lock - get the mutex (if any) that it is need to lock for
- * a given command.
- *
- * @vdev: Pointer to struct &video_device.
- * @cmd: Ioctl name.
- *
- * .. note:: Internal use only. Should not be used outside V4L2 core.
- */
-struct mutex *v4l2_ioctl_get_lock(struct video_device *vdev, unsigned int cmd);
-
/* names for fancy debug output */
extern const char *v4l2_field_names[];
extern const char *v4l2_type_names[];