summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/video4linux/v4l2-framework.txt6
-rw-r--r--drivers/media/video/gspca/gspca.c6
-rw-r--r--drivers/media/video/pwc/pwc-if.c6
-rw-r--r--drivers/media/video/v4l2-dev.c2
-rw-r--r--include/media/v4l2-dev.h10
-rw-r--r--sound/i2c/other/tea575x-tuner.c2
6 files changed, 16 insertions, 16 deletions
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index c24a9393dbb9..1f5905270050 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -623,7 +623,7 @@ In some cases you want to tell the core that a function you had specified in
your v4l2_ioctl_ops should be ignored. You can mark such ioctls by calling this
function before video_device_register is called:
-void v4l2_dont_use_cmd(struct video_device *vdev, unsigned int cmd);
+void v4l2_disable_ioctl(struct video_device *vdev, unsigned int cmd);
This tends to be needed if based on external factors (e.g. which card is
being used) you want to turns off certain features in v4l2_ioctl_ops without
@@ -655,9 +655,9 @@ will be either a top-level mutex or a mutex per device node. By default this
lock will be used for unlocked_ioctl, but you can disable locking for
selected ioctls by calling:
- void v4l2_dont_use_lock(struct video_device *vdev, unsigned int cmd);
+ void v4l2_disable_ioctl_locking(struct video_device *vdev, unsigned int cmd);
-E.g.: v4l2_dont_use_lock(vdev, VIDIOC_DQBUF);
+E.g.: v4l2_disable_ioctl_locking(vdev, VIDIOC_DQBUF);
You have to call this before you register the video_device.
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 2b393b2cf62d..137166d73945 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -2285,9 +2285,9 @@ int gspca_dev_probe2(struct usb_interface *intf,
* usb_lock is taken for a long time, e.g. when changing a control
* value, and a new frame is ready to be dequeued.
*/
- v4l2_dont_use_lock(&gspca_dev->vdev, VIDIOC_DQBUF);
- v4l2_dont_use_lock(&gspca_dev->vdev, VIDIOC_QBUF);
- v4l2_dont_use_lock(&gspca_dev->vdev, VIDIOC_QUERYBUF);
+ v4l2_disable_ioctl_locking(&gspca_dev->vdev, VIDIOC_DQBUF);
+ v4l2_disable_ioctl_locking(&gspca_dev->vdev, VIDIOC_QBUF);
+ v4l2_disable_ioctl_locking(&gspca_dev->vdev, VIDIOC_QUERYBUF);
/* init video stuff */
ret = video_register_device(&gspca_dev->vdev,
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index 998e809765a7..ec4e2ef54e65 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -1195,9 +1195,9 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
* v4l2_lock is taken for a long time, e.g. when changing a control
* value, and a new frame is ready to be dequeued.
*/
- v4l2_dont_use_lock(&pdev->vdev, VIDIOC_DQBUF);
- v4l2_dont_use_lock(&pdev->vdev, VIDIOC_QBUF);
- v4l2_dont_use_lock(&pdev->vdev, VIDIOC_QUERYBUF);
+ v4l2_disable_ioctl_locking(&pdev->vdev, VIDIOC_DQBUF);
+ v4l2_disable_ioctl_locking(&pdev->vdev, VIDIOC_QBUF);
+ v4l2_disable_ioctl_locking(&pdev->vdev, VIDIOC_QUERYBUF);
rc = video_register_device(&pdev->vdev, VFL_TYPE_GRABBER, -1);
if (rc < 0) {
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c
index 2c4feffa4939..5ccbd4629f9c 100644
--- a/drivers/media/video/v4l2-dev.c
+++ b/drivers/media/video/v4l2-dev.c
@@ -329,7 +329,7 @@ static long v4l2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
if (vdev->lock) {
/* always lock unless the cmd is marked as "don't use lock" */
locked = !v4l2_is_known_ioctl(cmd) ||
- !test_bit(_IOC_NR(cmd), vdev->dont_use_lock);
+ !test_bit(_IOC_NR(cmd), vdev->disable_locking);
if (locked && mutex_lock_interruptible(vdev->lock))
return -ERESTARTSYS;
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index 70d91c99728b..a056e6ee1b68 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -132,7 +132,7 @@ struct video_device
DECLARE_BITMAP(valid_ioctls, BASE_VIDIOC_PRIVATE);
/* serialization lock */
- DECLARE_BITMAP(dont_use_lock, BASE_VIDIOC_PRIVATE);
+ DECLARE_BITMAP(disable_locking, BASE_VIDIOC_PRIVATE);
struct mutex *lock;
};
@@ -182,17 +182,17 @@ void video_device_release_empty(struct video_device *vdev);
bool v4l2_is_known_ioctl(unsigned int cmd);
/* mark that this command shouldn't use core locking */
-static inline void v4l2_dont_use_lock(struct video_device *vdev, unsigned int cmd)
+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->dont_use_lock);
+ set_bit(_IOC_NR(cmd), vdev->disable_locking);
}
-/* Mark that this command isn't implemented, must be called before
+/* Mark that this command isn't implemented. This must be called before
video_device_register. See also the comments in determine_valid_ioctls().
This function allows drivers to provide just one v4l2_ioctl_ops struct, but
disable ioctls based on the specific card that is actually found. */
-static inline void v4l2_dont_use_cmd(struct video_device *vdev, unsigned int cmd)
+static inline void v4l2_disable_ioctl(struct video_device *vdev, unsigned int cmd)
{
if (_IOC_NR(cmd) < BASE_VIDIOC_PRIVATE)
set_bit(_IOC_NR(cmd), vdev->valid_ioctls);
diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c
index 6e9ca7bd0f11..582aace20ea3 100644
--- a/sound/i2c/other/tea575x-tuner.c
+++ b/sound/i2c/other/tea575x-tuner.c
@@ -377,7 +377,7 @@ int snd_tea575x_init(struct snd_tea575x *tea)
set_bit(V4L2_FL_USE_FH_PRIO, &tea->vd.flags);
/* disable hw_freq_seek if we can't use it */
if (tea->cannot_read_data)
- v4l2_dont_use_cmd(&tea->vd, VIDIOC_S_HW_FREQ_SEEK);
+ v4l2_disable_ioctl(&tea->vd, VIDIOC_S_HW_FREQ_SEEK);
v4l2_ctrl_handler_init(&tea->ctrl_handler, 1);
v4l2_ctrl_new_std(&tea->ctrl_handler, &tea575x_ctrl_ops, V4L2_CID_AUDIO_MUTE, 0, 1, 1, 1);