diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-05-14 10:32:48 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-14 14:06:50 -0400 |
commit | 152a3a7320d1582009db85d8be365ce430d079af (patch) | |
tree | 4ce91bc49ef493ce0299dd43c09f725b04ec567d | |
parent | 47bd4bc1a2624939c9f4ba154a2c18abe9d6c614 (diff) |
[media] v4l2-dev: rename two functions
Rename the function v4l2_dont_use_lock to v4l2_disable_ioctl_locking,
and rename v4l2_dont_use_cmd to v4l2_disable_ioctl.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | Documentation/video4linux/v4l2-framework.txt | 6 | ||||
-rw-r--r-- | drivers/media/video/gspca/gspca.c | 6 | ||||
-rw-r--r-- | drivers/media/video/pwc/pwc-if.c | 6 | ||||
-rw-r--r-- | drivers/media/video/v4l2-dev.c | 2 | ||||
-rw-r--r-- | include/media/v4l2-dev.h | 10 | ||||
-rw-r--r-- | sound/i2c/other/tea575x-tuner.c | 2 |
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 | |||
623 | your v4l2_ioctl_ops should be ignored. You can mark such ioctls by calling this | 623 | your v4l2_ioctl_ops should be ignored. You can mark such ioctls by calling this |
624 | function before video_device_register is called: | 624 | function before video_device_register is called: |
625 | 625 | ||
626 | void v4l2_dont_use_cmd(struct video_device *vdev, unsigned int cmd); | 626 | void v4l2_disable_ioctl(struct video_device *vdev, unsigned int cmd); |
627 | 627 | ||
628 | This tends to be needed if based on external factors (e.g. which card is | 628 | This tends to be needed if based on external factors (e.g. which card is |
629 | being used) you want to turns off certain features in v4l2_ioctl_ops without | 629 | 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 | |||
655 | lock will be used for unlocked_ioctl, but you can disable locking for | 655 | lock will be used for unlocked_ioctl, but you can disable locking for |
656 | selected ioctls by calling: | 656 | selected ioctls by calling: |
657 | 657 | ||
658 | void v4l2_dont_use_lock(struct video_device *vdev, unsigned int cmd); | 658 | void v4l2_disable_ioctl_locking(struct video_device *vdev, unsigned int cmd); |
659 | 659 | ||
660 | E.g.: v4l2_dont_use_lock(vdev, VIDIOC_DQBUF); | 660 | E.g.: v4l2_disable_ioctl_locking(vdev, VIDIOC_DQBUF); |
661 | 661 | ||
662 | You have to call this before you register the video_device. | 662 | You have to call this before you register the video_device. |
663 | 663 | ||
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, | |||
2285 | * usb_lock is taken for a long time, e.g. when changing a control | 2285 | * usb_lock is taken for a long time, e.g. when changing a control |
2286 | * value, and a new frame is ready to be dequeued. | 2286 | * value, and a new frame is ready to be dequeued. |
2287 | */ | 2287 | */ |
2288 | v4l2_dont_use_lock(&gspca_dev->vdev, VIDIOC_DQBUF); | 2288 | v4l2_disable_ioctl_locking(&gspca_dev->vdev, VIDIOC_DQBUF); |
2289 | v4l2_dont_use_lock(&gspca_dev->vdev, VIDIOC_QBUF); | 2289 | v4l2_disable_ioctl_locking(&gspca_dev->vdev, VIDIOC_QBUF); |
2290 | v4l2_dont_use_lock(&gspca_dev->vdev, VIDIOC_QUERYBUF); | 2290 | v4l2_disable_ioctl_locking(&gspca_dev->vdev, VIDIOC_QUERYBUF); |
2291 | 2291 | ||
2292 | /* init video stuff */ | 2292 | /* init video stuff */ |
2293 | ret = video_register_device(&gspca_dev->vdev, | 2293 | 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 | |||
1195 | * v4l2_lock is taken for a long time, e.g. when changing a control | 1195 | * v4l2_lock is taken for a long time, e.g. when changing a control |
1196 | * value, and a new frame is ready to be dequeued. | 1196 | * value, and a new frame is ready to be dequeued. |
1197 | */ | 1197 | */ |
1198 | v4l2_dont_use_lock(&pdev->vdev, VIDIOC_DQBUF); | 1198 | v4l2_disable_ioctl_locking(&pdev->vdev, VIDIOC_DQBUF); |
1199 | v4l2_dont_use_lock(&pdev->vdev, VIDIOC_QBUF); | 1199 | v4l2_disable_ioctl_locking(&pdev->vdev, VIDIOC_QBUF); |
1200 | v4l2_dont_use_lock(&pdev->vdev, VIDIOC_QUERYBUF); | 1200 | v4l2_disable_ioctl_locking(&pdev->vdev, VIDIOC_QUERYBUF); |
1201 | 1201 | ||
1202 | rc = video_register_device(&pdev->vdev, VFL_TYPE_GRABBER, -1); | 1202 | rc = video_register_device(&pdev->vdev, VFL_TYPE_GRABBER, -1); |
1203 | if (rc < 0) { | 1203 | 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) | |||
329 | if (vdev->lock) { | 329 | if (vdev->lock) { |
330 | /* always lock unless the cmd is marked as "don't use lock" */ | 330 | /* always lock unless the cmd is marked as "don't use lock" */ |
331 | locked = !v4l2_is_known_ioctl(cmd) || | 331 | locked = !v4l2_is_known_ioctl(cmd) || |
332 | !test_bit(_IOC_NR(cmd), vdev->dont_use_lock); | 332 | !test_bit(_IOC_NR(cmd), vdev->disable_locking); |
333 | 333 | ||
334 | if (locked && mutex_lock_interruptible(vdev->lock)) | 334 | if (locked && mutex_lock_interruptible(vdev->lock)) |
335 | return -ERESTARTSYS; | 335 | 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 | |||
132 | DECLARE_BITMAP(valid_ioctls, BASE_VIDIOC_PRIVATE); | 132 | DECLARE_BITMAP(valid_ioctls, BASE_VIDIOC_PRIVATE); |
133 | 133 | ||
134 | /* serialization lock */ | 134 | /* serialization lock */ |
135 | DECLARE_BITMAP(dont_use_lock, BASE_VIDIOC_PRIVATE); | 135 | DECLARE_BITMAP(disable_locking, BASE_VIDIOC_PRIVATE); |
136 | struct mutex *lock; | 136 | struct mutex *lock; |
137 | }; | 137 | }; |
138 | 138 | ||
@@ -182,17 +182,17 @@ void video_device_release_empty(struct video_device *vdev); | |||
182 | bool v4l2_is_known_ioctl(unsigned int cmd); | 182 | bool v4l2_is_known_ioctl(unsigned int cmd); |
183 | 183 | ||
184 | /* mark that this command shouldn't use core locking */ | 184 | /* mark that this command shouldn't use core locking */ |
185 | static inline void v4l2_dont_use_lock(struct video_device *vdev, unsigned int cmd) | 185 | static inline void v4l2_disable_ioctl_locking(struct video_device *vdev, unsigned int cmd) |
186 | { | 186 | { |
187 | if (_IOC_NR(cmd) < BASE_VIDIOC_PRIVATE) | 187 | if (_IOC_NR(cmd) < BASE_VIDIOC_PRIVATE) |
188 | set_bit(_IOC_NR(cmd), vdev->dont_use_lock); | 188 | set_bit(_IOC_NR(cmd), vdev->disable_locking); |
189 | } | 189 | } |
190 | 190 | ||
191 | /* Mark that this command isn't implemented, must be called before | 191 | /* Mark that this command isn't implemented. This must be called before |
192 | video_device_register. See also the comments in determine_valid_ioctls(). | 192 | video_device_register. See also the comments in determine_valid_ioctls(). |
193 | This function allows drivers to provide just one v4l2_ioctl_ops struct, but | 193 | This function allows drivers to provide just one v4l2_ioctl_ops struct, but |
194 | disable ioctls based on the specific card that is actually found. */ | 194 | disable ioctls based on the specific card that is actually found. */ |
195 | static inline void v4l2_dont_use_cmd(struct video_device *vdev, unsigned int cmd) | 195 | static inline void v4l2_disable_ioctl(struct video_device *vdev, unsigned int cmd) |
196 | { | 196 | { |
197 | if (_IOC_NR(cmd) < BASE_VIDIOC_PRIVATE) | 197 | if (_IOC_NR(cmd) < BASE_VIDIOC_PRIVATE) |
198 | set_bit(_IOC_NR(cmd), vdev->valid_ioctls); | 198 | 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) | |||
377 | set_bit(V4L2_FL_USE_FH_PRIO, &tea->vd.flags); | 377 | set_bit(V4L2_FL_USE_FH_PRIO, &tea->vd.flags); |
378 | /* disable hw_freq_seek if we can't use it */ | 378 | /* disable hw_freq_seek if we can't use it */ |
379 | if (tea->cannot_read_data) | 379 | if (tea->cannot_read_data) |
380 | v4l2_dont_use_cmd(&tea->vd, VIDIOC_S_HW_FREQ_SEEK); | 380 | v4l2_disable_ioctl(&tea->vd, VIDIOC_S_HW_FREQ_SEEK); |
381 | 381 | ||
382 | v4l2_ctrl_handler_init(&tea->ctrl_handler, 1); | 382 | v4l2_ctrl_handler_init(&tea->ctrl_handler, 1); |
383 | v4l2_ctrl_new_std(&tea->ctrl_handler, &tea575x_ctrl_ops, V4L2_CID_AUDIO_MUTE, 0, 1, 1, 1); | 383 | v4l2_ctrl_new_std(&tea->ctrl_handler, &tea575x_ctrl_ops, V4L2_CID_AUDIO_MUTE, 0, 1, 1, 1); |