diff options
Diffstat (limited to 'drivers/media/video/v4l2-ioctl.c')
-rw-r--r-- | drivers/media/video/v4l2-ioctl.c | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c index dd9283fcb564..7e47f15f350d 100644 --- a/drivers/media/video/v4l2-ioctl.c +++ b/drivers/media/video/v4l2-ioctl.c | |||
@@ -18,12 +18,8 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | 19 | ||
20 | #define __OLD_VIDIOC_ /* To allow fixing old calls */ | 20 | #define __OLD_VIDIOC_ /* To allow fixing old calls */ |
21 | #include <linux/videodev.h> | ||
22 | #include <linux/videodev2.h> | 21 | #include <linux/videodev2.h> |
23 | 22 | ||
24 | #ifdef CONFIG_VIDEO_V4L1 | ||
25 | #include <linux/videodev.h> | ||
26 | #endif | ||
27 | #include <media/v4l2-common.h> | 23 | #include <media/v4l2-common.h> |
28 | #include <media/v4l2-ioctl.h> | 24 | #include <media/v4l2-ioctl.h> |
29 | #include <media/v4l2-ctrls.h> | 25 | #include <media/v4l2-ctrls.h> |
@@ -183,42 +179,6 @@ static const char *v4l2_memory_names[] = { | |||
183 | 179 | ||
184 | /* ------------------------------------------------------------------ */ | 180 | /* ------------------------------------------------------------------ */ |
185 | /* debug help functions */ | 181 | /* debug help functions */ |
186 | |||
187 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
188 | static const char *v4l1_ioctls[] = { | ||
189 | [_IOC_NR(VIDIOCGCAP)] = "VIDIOCGCAP", | ||
190 | [_IOC_NR(VIDIOCGCHAN)] = "VIDIOCGCHAN", | ||
191 | [_IOC_NR(VIDIOCSCHAN)] = "VIDIOCSCHAN", | ||
192 | [_IOC_NR(VIDIOCGTUNER)] = "VIDIOCGTUNER", | ||
193 | [_IOC_NR(VIDIOCSTUNER)] = "VIDIOCSTUNER", | ||
194 | [_IOC_NR(VIDIOCGPICT)] = "VIDIOCGPICT", | ||
195 | [_IOC_NR(VIDIOCSPICT)] = "VIDIOCSPICT", | ||
196 | [_IOC_NR(VIDIOCCAPTURE)] = "VIDIOCCAPTURE", | ||
197 | [_IOC_NR(VIDIOCGWIN)] = "VIDIOCGWIN", | ||
198 | [_IOC_NR(VIDIOCSWIN)] = "VIDIOCSWIN", | ||
199 | [_IOC_NR(VIDIOCGFBUF)] = "VIDIOCGFBUF", | ||
200 | [_IOC_NR(VIDIOCSFBUF)] = "VIDIOCSFBUF", | ||
201 | [_IOC_NR(VIDIOCKEY)] = "VIDIOCKEY", | ||
202 | [_IOC_NR(VIDIOCGFREQ)] = "VIDIOCGFREQ", | ||
203 | [_IOC_NR(VIDIOCSFREQ)] = "VIDIOCSFREQ", | ||
204 | [_IOC_NR(VIDIOCGAUDIO)] = "VIDIOCGAUDIO", | ||
205 | [_IOC_NR(VIDIOCSAUDIO)] = "VIDIOCSAUDIO", | ||
206 | [_IOC_NR(VIDIOCSYNC)] = "VIDIOCSYNC", | ||
207 | [_IOC_NR(VIDIOCMCAPTURE)] = "VIDIOCMCAPTURE", | ||
208 | [_IOC_NR(VIDIOCGMBUF)] = "VIDIOCGMBUF", | ||
209 | [_IOC_NR(VIDIOCGUNIT)] = "VIDIOCGUNIT", | ||
210 | [_IOC_NR(VIDIOCGCAPTURE)] = "VIDIOCGCAPTURE", | ||
211 | [_IOC_NR(VIDIOCSCAPTURE)] = "VIDIOCSCAPTURE", | ||
212 | [_IOC_NR(VIDIOCSPLAYMODE)] = "VIDIOCSPLAYMODE", | ||
213 | [_IOC_NR(VIDIOCSWRITEMODE)] = "VIDIOCSWRITEMODE", | ||
214 | [_IOC_NR(VIDIOCGPLAYINFO)] = "VIDIOCGPLAYINFO", | ||
215 | [_IOC_NR(VIDIOCSMICROCODE)] = "VIDIOCSMICROCODE", | ||
216 | [_IOC_NR(VIDIOCGVBIFMT)] = "VIDIOCGVBIFMT", | ||
217 | [_IOC_NR(VIDIOCSVBIFMT)] = "VIDIOCSVBIFMT" | ||
218 | }; | ||
219 | #define V4L1_IOCTLS ARRAY_SIZE(v4l1_ioctls) | ||
220 | #endif | ||
221 | |||
222 | static const char *v4l2_ioctls[] = { | 182 | static const char *v4l2_ioctls[] = { |
223 | [_IOC_NR(VIDIOC_QUERYCAP)] = "VIDIOC_QUERYCAP", | 183 | [_IOC_NR(VIDIOC_QUERYCAP)] = "VIDIOC_QUERYCAP", |
224 | [_IOC_NR(VIDIOC_RESERVED)] = "VIDIOC_RESERVED", | 184 | [_IOC_NR(VIDIOC_RESERVED)] = "VIDIOC_RESERVED", |
@@ -310,15 +270,6 @@ void v4l_printk_ioctl(unsigned int cmd) | |||
310 | case 'd': | 270 | case 'd': |
311 | type = "v4l2_int"; | 271 | type = "v4l2_int"; |
312 | break; | 272 | break; |
313 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
314 | case 'v': | ||
315 | if (_IOC_NR(cmd) >= V4L1_IOCTLS) { | ||
316 | type = "v4l1"; | ||
317 | break; | ||
318 | } | ||
319 | printk("%s", v4l1_ioctls[_IOC_NR(cmd)]); | ||
320 | return; | ||
321 | #endif | ||
322 | case 'V': | 273 | case 'V': |
323 | if (_IOC_NR(cmd) >= V4L2_IOCTLS) { | 274 | if (_IOC_NR(cmd) >= V4L2_IOCTLS) { |
324 | type = "v4l2"; | 275 | type = "v4l2"; |
@@ -622,20 +573,6 @@ static long __video_do_ioctl(struct file *file, | |||
622 | return -EINVAL; | 573 | return -EINVAL; |
623 | } | 574 | } |
624 | 575 | ||
625 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
626 | /******************************************************** | ||
627 | All other V4L1 calls are handled by v4l1_compat module. | ||
628 | Those calls will be translated into V4L2 calls, and | ||
629 | __video_do_ioctl will be called again, with one or more | ||
630 | V4L2 ioctls. | ||
631 | ********************************************************/ | ||
632 | if (_IOC_TYPE(cmd) == 'v' && cmd != VIDIOCGMBUF && | ||
633 | _IOC_NR(cmd) < BASE_VIDIOCPRIVATE) { | ||
634 | return v4l_compat_translate_ioctl(file, cmd, arg, | ||
635 | __video_do_ioctl); | ||
636 | } | ||
637 | #endif | ||
638 | |||
639 | if ((vfd->debug & V4L2_DEBUG_IOCTL) && | 576 | if ((vfd->debug & V4L2_DEBUG_IOCTL) && |
640 | !(vfd->debug & V4L2_DEBUG_IOCTL_ARG)) { | 577 | !(vfd->debug & V4L2_DEBUG_IOCTL_ARG)) { |
641 | v4l_print_ioctl(vfd->name, cmd); | 578 | v4l_print_ioctl(vfd->name, cmd); |
@@ -644,29 +581,6 @@ static long __video_do_ioctl(struct file *file, | |||
644 | 581 | ||
645 | switch (cmd) { | 582 | switch (cmd) { |
646 | 583 | ||
647 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
648 | /*********************************************************** | ||
649 | Handles calls to the obsoleted V4L1 API | ||
650 | Due to the nature of VIDIOCGMBUF, each driver that supports | ||
651 | V4L1 should implement its own handler for this ioctl. | ||
652 | ***********************************************************/ | ||
653 | |||
654 | /* --- streaming capture ------------------------------------- */ | ||
655 | case VIDIOCGMBUF: | ||
656 | { | ||
657 | struct video_mbuf *p = arg; | ||
658 | |||
659 | if (!ops->vidiocgmbuf) | ||
660 | break; | ||
661 | ret = ops->vidiocgmbuf(file, fh, p); | ||
662 | if (!ret) | ||
663 | dbgarg(cmd, "size=%d, frames=%d, offsets=0x%08lx\n", | ||
664 | p->size, p->frames, | ||
665 | (unsigned long)p->offsets); | ||
666 | break; | ||
667 | } | ||
668 | #endif | ||
669 | |||
670 | /* --- capabilities ------------------------------------------ */ | 584 | /* --- capabilities ------------------------------------------ */ |
671 | case VIDIOC_QUERYCAP: | 585 | case VIDIOC_QUERYCAP: |
672 | { | 586 | { |