Commit 0d5615d3 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

media: v4l2-ioctl: delete unused v4l2_disable_ioctl_locking

The last user of this 'feature' was the gspca driver. Now that
that driver has been converted to vb2 we can delete this code.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 8a7c5594
...@@ -2666,8 +2666,6 @@ struct mutex *v4l2_ioctl_get_lock(struct video_device *vdev, unsigned cmd) ...@@ -2666,8 +2666,6 @@ struct mutex *v4l2_ioctl_get_lock(struct video_device *vdev, unsigned cmd)
{ {
if (_IOC_NR(cmd) >= V4L2_IOCTLS) if (_IOC_NR(cmd) >= V4L2_IOCTLS)
return vdev->lock; return vdev->lock;
if (test_bit(_IOC_NR(cmd), vdev->disable_locking))
return NULL;
if (vdev->queue && vdev->queue->lock && if (vdev->queue && vdev->queue->lock &&
(v4l2_ioctls[_IOC_NR(cmd)].flags & INFO_FL_QUEUE)) (v4l2_ioctls[_IOC_NR(cmd)].flags & INFO_FL_QUEUE))
return vdev->queue->lock; return vdev->queue->lock;
......
...@@ -238,7 +238,6 @@ struct v4l2_file_operations { ...@@ -238,7 +238,6 @@ struct v4l2_file_operations {
* @ioctl_ops: pointer to &struct v4l2_ioctl_ops with ioctl callbacks * @ioctl_ops: pointer to &struct v4l2_ioctl_ops with ioctl callbacks
* *
* @valid_ioctls: bitmap with the valid ioctls for this device * @valid_ioctls: bitmap with the valid ioctls for this device
* @disable_locking: bitmap with the ioctls that don't require locking
* @lock: pointer to &struct mutex serialization lock * @lock: pointer to &struct mutex serialization lock
* *
* .. note:: * .. note::
...@@ -291,7 +290,6 @@ struct video_device ...@@ -291,7 +290,6 @@ struct video_device
const struct v4l2_ioctl_ops *ioctl_ops; const struct v4l2_ioctl_ops *ioctl_ops;
DECLARE_BITMAP(valid_ioctls, BASE_VIDIOC_PRIVATE); DECLARE_BITMAP(valid_ioctls, BASE_VIDIOC_PRIVATE);
DECLARE_BITMAP(disable_locking, BASE_VIDIOC_PRIVATE);
struct mutex *lock; struct mutex *lock;
}; };
...@@ -446,19 +444,6 @@ void video_device_release_empty(struct video_device *vdev); ...@@ -446,19 +444,6 @@ void video_device_release_empty(struct video_device *vdev);
*/ */
bool v4l2_is_known_ioctl(unsigned int cmd); bool v4l2_is_known_ioctl(unsigned int cmd);
/** v4l2_disable_ioctl_locking - mark that a given command
* shouldn't use core locking
*
* @vdev: pointer to &struct video_device
* @cmd: ioctl command
*/
static inline void v4l2_disable_ioctl_locking(struct video_device *vdev,
unsigned int cmd)
{
if (_IOC_NR(cmd) < BASE_VIDIOC_PRIVATE)
set_bit(_IOC_NR(cmd), vdev->disable_locking);
}
/** /**
* v4l2_disable_ioctl- mark that a given command isn't implemented. * v4l2_disable_ioctl- mark that a given command isn't implemented.
* shouldn't use core locking * shouldn't use core locking
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment