aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/v4l2-ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/v4l2-ioctl.c')
-rw-r--r--drivers/media/video/v4l2-ioctl.c418
1 files changed, 214 insertions, 204 deletions
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c
index 56a4fdee9160..fdfe7739c96e 100644
--- a/drivers/media/video/v4l2-ioctl.c
+++ b/drivers/media/video/v4l2-ioctl.c
@@ -579,43 +579,46 @@ static inline int check_ext_ctrls(struct v4l2_ext_controls *c, int allow_priv)
579 return 1; 579 return 1;
580} 580}
581 581
582static int check_fmt(struct video_device *vfd, enum v4l2_buf_type type) 582static int check_fmt(const struct v4l2_ioctl_ops *ops, enum v4l2_buf_type type)
583{ 583{
584 if (ops == NULL)
585 return -EINVAL;
586
584 switch (type) { 587 switch (type) {
585 case V4L2_BUF_TYPE_VIDEO_CAPTURE: 588 case V4L2_BUF_TYPE_VIDEO_CAPTURE:
586 if (vfd->vidioc_try_fmt_vid_cap) 589 if (ops->vidioc_try_fmt_vid_cap)
587 return 0; 590 return 0;
588 break; 591 break;
589 case V4L2_BUF_TYPE_VIDEO_OVERLAY: 592 case V4L2_BUF_TYPE_VIDEO_OVERLAY:
590 if (vfd->vidioc_try_fmt_vid_overlay) 593 if (ops->vidioc_try_fmt_vid_overlay)
591 return 0; 594 return 0;
592 break; 595 break;
593 case V4L2_BUF_TYPE_VIDEO_OUTPUT: 596 case V4L2_BUF_TYPE_VIDEO_OUTPUT:
594 if (vfd->vidioc_try_fmt_vid_out) 597 if (ops->vidioc_try_fmt_vid_out)
595 return 0; 598 return 0;
596 break; 599 break;
597 case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY: 600 case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
598 if (vfd->vidioc_try_fmt_vid_out_overlay) 601 if (ops->vidioc_try_fmt_vid_out_overlay)
599 return 0; 602 return 0;
600 break; 603 break;
601 case V4L2_BUF_TYPE_VBI_CAPTURE: 604 case V4L2_BUF_TYPE_VBI_CAPTURE:
602 if (vfd->vidioc_try_fmt_vbi_cap) 605 if (ops->vidioc_try_fmt_vbi_cap)
603 return 0; 606 return 0;
604 break; 607 break;
605 case V4L2_BUF_TYPE_VBI_OUTPUT: 608 case V4L2_BUF_TYPE_VBI_OUTPUT:
606 if (vfd->vidioc_try_fmt_vbi_out) 609 if (ops->vidioc_try_fmt_vbi_out)
607 return 0; 610 return 0;
608 break; 611 break;
609 case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: 612 case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
610 if (vfd->vidioc_try_fmt_sliced_vbi_cap) 613 if (ops->vidioc_try_fmt_sliced_vbi_cap)
611 return 0; 614 return 0;
612 break; 615 break;
613 case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: 616 case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
614 if (vfd->vidioc_try_fmt_sliced_vbi_out) 617 if (ops->vidioc_try_fmt_sliced_vbi_out)
615 return 0; 618 return 0;
616 break; 619 break;
617 case V4L2_BUF_TYPE_PRIVATE: 620 case V4L2_BUF_TYPE_PRIVATE:
618 if (vfd->vidioc_try_fmt_type_private) 621 if (ops->vidioc_try_fmt_type_private)
619 return 0; 622 return 0;
620 break; 623 break;
621 } 624 }
@@ -626,6 +629,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
626 unsigned int cmd, void *arg) 629 unsigned int cmd, void *arg)
627{ 630{
628 struct video_device *vfd = video_devdata(file); 631 struct video_device *vfd = video_devdata(file);
632 const struct v4l2_ioctl_ops *ops = vfd->ioctl_ops;
629 void *fh = file->private_data; 633 void *fh = file->private_data;
630 int ret = -EINVAL; 634 int ret = -EINVAL;
631 635
@@ -635,6 +639,12 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
635 printk(KERN_CONT "\n"); 639 printk(KERN_CONT "\n");
636 } 640 }
637 641
642 if (ops == NULL) {
643 printk(KERN_WARNING "videodev: \"%s\" has no ioctl_ops.\n",
644 vfd->name);
645 return -EINVAL;
646 }
647
638#ifdef CONFIG_VIDEO_V4L1_COMPAT 648#ifdef CONFIG_VIDEO_V4L1_COMPAT
639 /*********************************************************** 649 /***********************************************************
640 Handles calls to the obsoleted V4L1 API 650 Handles calls to the obsoleted V4L1 API
@@ -648,9 +658,9 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
648 658
649 memset(p, 0, sizeof(*p)); 659 memset(p, 0, sizeof(*p));
650 660
651 if (!vfd->vidiocgmbuf) 661 if (!ops->vidiocgmbuf)
652 return ret; 662 return ret;
653 ret = vfd->vidiocgmbuf(file, fh, p); 663 ret = ops->vidiocgmbuf(file, fh, p);
654 if (!ret) 664 if (!ret)
655 dbgarg(cmd, "size=%d, frames=%d, offsets=0x%08lx\n", 665 dbgarg(cmd, "size=%d, frames=%d, offsets=0x%08lx\n",
656 p->size, p->frames, 666 p->size, p->frames,
@@ -676,10 +686,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
676 struct v4l2_capability *cap = (struct v4l2_capability *)arg; 686 struct v4l2_capability *cap = (struct v4l2_capability *)arg;
677 memset(cap, 0, sizeof(*cap)); 687 memset(cap, 0, sizeof(*cap));
678 688
679 if (!vfd->vidioc_querycap) 689 if (!ops->vidioc_querycap)
680 break; 690 break;
681 691
682 ret = vfd->vidioc_querycap(file, fh, cap); 692 ret = ops->vidioc_querycap(file, fh, cap);
683 if (!ret) 693 if (!ret)
684 dbgarg(cmd, "driver=%s, card=%s, bus=%s, " 694 dbgarg(cmd, "driver=%s, card=%s, bus=%s, "
685 "version=0x%08x, " 695 "version=0x%08x, "
@@ -695,9 +705,9 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
695 { 705 {
696 enum v4l2_priority *p = arg; 706 enum v4l2_priority *p = arg;
697 707
698 if (!vfd->vidioc_g_priority) 708 if (!ops->vidioc_g_priority)
699 break; 709 break;
700 ret = vfd->vidioc_g_priority(file, fh, p); 710 ret = ops->vidioc_g_priority(file, fh, p);
701 if (!ret) 711 if (!ret)
702 dbgarg(cmd, "priority is %d\n", *p); 712 dbgarg(cmd, "priority is %d\n", *p);
703 break; 713 break;
@@ -706,10 +716,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
706 { 716 {
707 enum v4l2_priority *p = arg; 717 enum v4l2_priority *p = arg;
708 718
709 if (!vfd->vidioc_s_priority) 719 if (!ops->vidioc_s_priority)
710 break; 720 break;
711 dbgarg(cmd, "setting priority to %d\n", *p); 721 dbgarg(cmd, "setting priority to %d\n", *p);
712 ret = vfd->vidioc_s_priority(file, fh, *p); 722 ret = ops->vidioc_s_priority(file, fh, *p);
713 break; 723 break;
714 } 724 }
715 725
@@ -728,12 +738,12 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
728 738
729 switch (type) { 739 switch (type) {
730 case V4L2_BUF_TYPE_VIDEO_CAPTURE: 740 case V4L2_BUF_TYPE_VIDEO_CAPTURE:
731 if (vfd->vidioc_enum_fmt_vid_cap) 741 if (ops->vidioc_enum_fmt_vid_cap)
732 ret = vfd->vidioc_enum_fmt_vid_cap(file, fh, f); 742 ret = ops->vidioc_enum_fmt_vid_cap(file, fh, f);
733 break; 743 break;
734 case V4L2_BUF_TYPE_VIDEO_OVERLAY: 744 case V4L2_BUF_TYPE_VIDEO_OVERLAY:
735 if (vfd->vidioc_enum_fmt_vid_overlay) 745 if (ops->vidioc_enum_fmt_vid_overlay)
736 ret = vfd->vidioc_enum_fmt_vid_overlay(file, 746 ret = ops->vidioc_enum_fmt_vid_overlay(file,
737 fh, f); 747 fh, f);
738 break; 748 break;
739#if 1 749#if 1
@@ -742,19 +752,19 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
742 * it though, so just warn that this is deprecated and will be 752 * it though, so just warn that this is deprecated and will be
743 * removed in the near future. */ 753 * removed in the near future. */
744 case V4L2_BUF_TYPE_VBI_CAPTURE: 754 case V4L2_BUF_TYPE_VBI_CAPTURE:
745 if (vfd->vidioc_enum_fmt_vbi_cap) { 755 if (ops->vidioc_enum_fmt_vbi_cap) {
746 printk(KERN_WARNING "vidioc_enum_fmt_vbi_cap will be removed in 2.6.28!\n"); 756 printk(KERN_WARNING "vidioc_enum_fmt_vbi_cap will be removed in 2.6.28!\n");
747 ret = vfd->vidioc_enum_fmt_vbi_cap(file, fh, f); 757 ret = ops->vidioc_enum_fmt_vbi_cap(file, fh, f);
748 } 758 }
749 break; 759 break;
750#endif 760#endif
751 case V4L2_BUF_TYPE_VIDEO_OUTPUT: 761 case V4L2_BUF_TYPE_VIDEO_OUTPUT:
752 if (vfd->vidioc_enum_fmt_vid_out) 762 if (ops->vidioc_enum_fmt_vid_out)
753 ret = vfd->vidioc_enum_fmt_vid_out(file, fh, f); 763 ret = ops->vidioc_enum_fmt_vid_out(file, fh, f);
754 break; 764 break;
755 case V4L2_BUF_TYPE_PRIVATE: 765 case V4L2_BUF_TYPE_PRIVATE:
756 if (vfd->vidioc_enum_fmt_type_private) 766 if (ops->vidioc_enum_fmt_type_private)
757 ret = vfd->vidioc_enum_fmt_type_private(file, 767 ret = ops->vidioc_enum_fmt_type_private(file,
758 fh, f); 768 fh, f);
759 break; 769 break;
760 default: 770 default:
@@ -782,48 +792,48 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
782 792
783 switch (f->type) { 793 switch (f->type) {
784 case V4L2_BUF_TYPE_VIDEO_CAPTURE: 794 case V4L2_BUF_TYPE_VIDEO_CAPTURE:
785 if (vfd->vidioc_g_fmt_vid_cap) 795 if (ops->vidioc_g_fmt_vid_cap)
786 ret = vfd->vidioc_g_fmt_vid_cap(file, fh, f); 796 ret = ops->vidioc_g_fmt_vid_cap(file, fh, f);
787 if (!ret) 797 if (!ret)
788 v4l_print_pix_fmt(vfd, &f->fmt.pix); 798 v4l_print_pix_fmt(vfd, &f->fmt.pix);
789 break; 799 break;
790 case V4L2_BUF_TYPE_VIDEO_OVERLAY: 800 case V4L2_BUF_TYPE_VIDEO_OVERLAY:
791 if (vfd->vidioc_g_fmt_vid_overlay) 801 if (ops->vidioc_g_fmt_vid_overlay)
792 ret = vfd->vidioc_g_fmt_vid_overlay(file, 802 ret = ops->vidioc_g_fmt_vid_overlay(file,
793 fh, f); 803 fh, f);
794 break; 804 break;
795 case V4L2_BUF_TYPE_VIDEO_OUTPUT: 805 case V4L2_BUF_TYPE_VIDEO_OUTPUT:
796 if (vfd->vidioc_g_fmt_vid_out) 806 if (ops->vidioc_g_fmt_vid_out)
797 ret = vfd->vidioc_g_fmt_vid_out(file, fh, f); 807 ret = ops->vidioc_g_fmt_vid_out(file, fh, f);
798 if (!ret) 808 if (!ret)
799 v4l_print_pix_fmt(vfd, &f->fmt.pix); 809 v4l_print_pix_fmt(vfd, &f->fmt.pix);
800 break; 810 break;
801 case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY: 811 case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
802 if (vfd->vidioc_g_fmt_vid_out_overlay) 812 if (ops->vidioc_g_fmt_vid_out_overlay)
803 ret = vfd->vidioc_g_fmt_vid_out_overlay(file, 813 ret = ops->vidioc_g_fmt_vid_out_overlay(file,
804 fh, f); 814 fh, f);
805 break; 815 break;
806 case V4L2_BUF_TYPE_VBI_CAPTURE: 816 case V4L2_BUF_TYPE_VBI_CAPTURE:
807 if (vfd->vidioc_g_fmt_vbi_cap) 817 if (ops->vidioc_g_fmt_vbi_cap)
808 ret = vfd->vidioc_g_fmt_vbi_cap(file, fh, f); 818 ret = ops->vidioc_g_fmt_vbi_cap(file, fh, f);
809 break; 819 break;
810 case V4L2_BUF_TYPE_VBI_OUTPUT: 820 case V4L2_BUF_TYPE_VBI_OUTPUT:
811 if (vfd->vidioc_g_fmt_vbi_out) 821 if (ops->vidioc_g_fmt_vbi_out)
812 ret = vfd->vidioc_g_fmt_vbi_out(file, fh, f); 822 ret = ops->vidioc_g_fmt_vbi_out(file, fh, f);
813 break; 823 break;
814 case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: 824 case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
815 if (vfd->vidioc_g_fmt_sliced_vbi_cap) 825 if (ops->vidioc_g_fmt_sliced_vbi_cap)
816 ret = vfd->vidioc_g_fmt_sliced_vbi_cap(file, 826 ret = ops->vidioc_g_fmt_sliced_vbi_cap(file,
817 fh, f); 827 fh, f);
818 break; 828 break;
819 case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: 829 case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
820 if (vfd->vidioc_g_fmt_sliced_vbi_out) 830 if (ops->vidioc_g_fmt_sliced_vbi_out)
821 ret = vfd->vidioc_g_fmt_sliced_vbi_out(file, 831 ret = ops->vidioc_g_fmt_sliced_vbi_out(file,
822 fh, f); 832 fh, f);
823 break; 833 break;
824 case V4L2_BUF_TYPE_PRIVATE: 834 case V4L2_BUF_TYPE_PRIVATE:
825 if (vfd->vidioc_g_fmt_type_private) 835 if (ops->vidioc_g_fmt_type_private)
826 ret = vfd->vidioc_g_fmt_type_private(file, 836 ret = ops->vidioc_g_fmt_type_private(file,
827 fh, f); 837 fh, f);
828 break; 838 break;
829 } 839 }
@@ -840,45 +850,45 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
840 switch (f->type) { 850 switch (f->type) {
841 case V4L2_BUF_TYPE_VIDEO_CAPTURE: 851 case V4L2_BUF_TYPE_VIDEO_CAPTURE:
842 v4l_print_pix_fmt(vfd, &f->fmt.pix); 852 v4l_print_pix_fmt(vfd, &f->fmt.pix);
843 if (vfd->vidioc_s_fmt_vid_cap) 853 if (ops->vidioc_s_fmt_vid_cap)
844 ret = vfd->vidioc_s_fmt_vid_cap(file, fh, f); 854 ret = ops->vidioc_s_fmt_vid_cap(file, fh, f);
845 break; 855 break;
846 case V4L2_BUF_TYPE_VIDEO_OVERLAY: 856 case V4L2_BUF_TYPE_VIDEO_OVERLAY:
847 if (vfd->vidioc_s_fmt_vid_overlay) 857 if (ops->vidioc_s_fmt_vid_overlay)
848 ret = vfd->vidioc_s_fmt_vid_overlay(file, 858 ret = ops->vidioc_s_fmt_vid_overlay(file,
849 fh, f); 859 fh, f);
850 break; 860 break;
851 case V4L2_BUF_TYPE_VIDEO_OUTPUT: 861 case V4L2_BUF_TYPE_VIDEO_OUTPUT:
852 v4l_print_pix_fmt(vfd, &f->fmt.pix); 862 v4l_print_pix_fmt(vfd, &f->fmt.pix);
853 if (vfd->vidioc_s_fmt_vid_out) 863 if (ops->vidioc_s_fmt_vid_out)
854 ret = vfd->vidioc_s_fmt_vid_out(file, fh, f); 864 ret = ops->vidioc_s_fmt_vid_out(file, fh, f);
855 break; 865 break;
856 case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY: 866 case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
857 if (vfd->vidioc_s_fmt_vid_out_overlay) 867 if (ops->vidioc_s_fmt_vid_out_overlay)
858 ret = vfd->vidioc_s_fmt_vid_out_overlay(file, 868 ret = ops->vidioc_s_fmt_vid_out_overlay(file,
859 fh, f); 869 fh, f);
860 break; 870 break;
861 case V4L2_BUF_TYPE_VBI_CAPTURE: 871 case V4L2_BUF_TYPE_VBI_CAPTURE:
862 if (vfd->vidioc_s_fmt_vbi_cap) 872 if (ops->vidioc_s_fmt_vbi_cap)
863 ret = vfd->vidioc_s_fmt_vbi_cap(file, fh, f); 873 ret = ops->vidioc_s_fmt_vbi_cap(file, fh, f);
864 break; 874 break;
865 case V4L2_BUF_TYPE_VBI_OUTPUT: 875 case V4L2_BUF_TYPE_VBI_OUTPUT:
866 if (vfd->vidioc_s_fmt_vbi_out) 876 if (ops->vidioc_s_fmt_vbi_out)
867 ret = vfd->vidioc_s_fmt_vbi_out(file, fh, f); 877 ret = ops->vidioc_s_fmt_vbi_out(file, fh, f);
868 break; 878 break;
869 case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: 879 case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
870 if (vfd->vidioc_s_fmt_sliced_vbi_cap) 880 if (ops->vidioc_s_fmt_sliced_vbi_cap)
871 ret = vfd->vidioc_s_fmt_sliced_vbi_cap(file, 881 ret = ops->vidioc_s_fmt_sliced_vbi_cap(file,
872 fh, f); 882 fh, f);
873 break; 883 break;
874 case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: 884 case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
875 if (vfd->vidioc_s_fmt_sliced_vbi_out) 885 if (ops->vidioc_s_fmt_sliced_vbi_out)
876 ret = vfd->vidioc_s_fmt_sliced_vbi_out(file, 886 ret = ops->vidioc_s_fmt_sliced_vbi_out(file,
877 fh, f); 887 fh, f);
878 break; 888 break;
879 case V4L2_BUF_TYPE_PRIVATE: 889 case V4L2_BUF_TYPE_PRIVATE:
880 if (vfd->vidioc_s_fmt_type_private) 890 if (ops->vidioc_s_fmt_type_private)
881 ret = vfd->vidioc_s_fmt_type_private(file, 891 ret = ops->vidioc_s_fmt_type_private(file,
882 fh, f); 892 fh, f);
883 break; 893 break;
884 } 894 }
@@ -893,48 +903,48 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
893 v4l2_type_names)); 903 v4l2_type_names));
894 switch (f->type) { 904 switch (f->type) {
895 case V4L2_BUF_TYPE_VIDEO_CAPTURE: 905 case V4L2_BUF_TYPE_VIDEO_CAPTURE:
896 if (vfd->vidioc_try_fmt_vid_cap) 906 if (ops->vidioc_try_fmt_vid_cap)
897 ret = vfd->vidioc_try_fmt_vid_cap(file, fh, f); 907 ret = ops->vidioc_try_fmt_vid_cap(file, fh, f);
898 if (!ret) 908 if (!ret)
899 v4l_print_pix_fmt(vfd, &f->fmt.pix); 909 v4l_print_pix_fmt(vfd, &f->fmt.pix);
900 break; 910 break;
901 case V4L2_BUF_TYPE_VIDEO_OVERLAY: 911 case V4L2_BUF_TYPE_VIDEO_OVERLAY:
902 if (vfd->vidioc_try_fmt_vid_overlay) 912 if (ops->vidioc_try_fmt_vid_overlay)
903 ret = vfd->vidioc_try_fmt_vid_overlay(file, 913 ret = ops->vidioc_try_fmt_vid_overlay(file,
904 fh, f); 914 fh, f);
905 break; 915 break;
906 case V4L2_BUF_TYPE_VIDEO_OUTPUT: 916 case V4L2_BUF_TYPE_VIDEO_OUTPUT:
907 if (vfd->vidioc_try_fmt_vid_out) 917 if (ops->vidioc_try_fmt_vid_out)
908 ret = vfd->vidioc_try_fmt_vid_out(file, fh, f); 918 ret = ops->vidioc_try_fmt_vid_out(file, fh, f);
909 if (!ret) 919 if (!ret)
910 v4l_print_pix_fmt(vfd, &f->fmt.pix); 920 v4l_print_pix_fmt(vfd, &f->fmt.pix);
911 break; 921 break;
912 case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY: 922 case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
913 if (vfd->vidioc_try_fmt_vid_out_overlay) 923 if (ops->vidioc_try_fmt_vid_out_overlay)
914 ret = vfd->vidioc_try_fmt_vid_out_overlay(file, 924 ret = ops->vidioc_try_fmt_vid_out_overlay(file,
915 fh, f); 925 fh, f);
916 break; 926 break;
917 case V4L2_BUF_TYPE_VBI_CAPTURE: 927 case V4L2_BUF_TYPE_VBI_CAPTURE:
918 if (vfd->vidioc_try_fmt_vbi_cap) 928 if (ops->vidioc_try_fmt_vbi_cap)
919 ret = vfd->vidioc_try_fmt_vbi_cap(file, fh, f); 929 ret = ops->vidioc_try_fmt_vbi_cap(file, fh, f);
920 break; 930 break;
921 case V4L2_BUF_TYPE_VBI_OUTPUT: 931 case V4L2_BUF_TYPE_VBI_OUTPUT:
922 if (vfd->vidioc_try_fmt_vbi_out) 932 if (ops->vidioc_try_fmt_vbi_out)
923 ret = vfd->vidioc_try_fmt_vbi_out(file, fh, f); 933 ret = ops->vidioc_try_fmt_vbi_out(file, fh, f);
924 break; 934 break;
925 case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: 935 case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
926 if (vfd->vidioc_try_fmt_sliced_vbi_cap) 936 if (ops->vidioc_try_fmt_sliced_vbi_cap)
927 ret = vfd->vidioc_try_fmt_sliced_vbi_cap(file, 937 ret = ops->vidioc_try_fmt_sliced_vbi_cap(file,
928 fh, f); 938 fh, f);
929 break; 939 break;
930 case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: 940 case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
931 if (vfd->vidioc_try_fmt_sliced_vbi_out) 941 if (ops->vidioc_try_fmt_sliced_vbi_out)
932 ret = vfd->vidioc_try_fmt_sliced_vbi_out(file, 942 ret = ops->vidioc_try_fmt_sliced_vbi_out(file,
933 fh, f); 943 fh, f);
934 break; 944 break;
935 case V4L2_BUF_TYPE_PRIVATE: 945 case V4L2_BUF_TYPE_PRIVATE:
936 if (vfd->vidioc_try_fmt_type_private) 946 if (ops->vidioc_try_fmt_type_private)
937 ret = vfd->vidioc_try_fmt_type_private(file, 947 ret = ops->vidioc_try_fmt_type_private(file,
938 fh, f); 948 fh, f);
939 break; 949 break;
940 } 950 }
@@ -949,13 +959,13 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
949 { 959 {
950 struct v4l2_requestbuffers *p = arg; 960 struct v4l2_requestbuffers *p = arg;
951 961
952 if (!vfd->vidioc_reqbufs) 962 if (!ops->vidioc_reqbufs)
953 break; 963 break;
954 ret = check_fmt(vfd, p->type); 964 ret = check_fmt(ops, p->type);
955 if (ret) 965 if (ret)
956 break; 966 break;
957 967
958 ret = vfd->vidioc_reqbufs(file, fh, p); 968 ret = ops->vidioc_reqbufs(file, fh, p);
959 dbgarg(cmd, "count=%d, type=%s, memory=%s\n", 969 dbgarg(cmd, "count=%d, type=%s, memory=%s\n",
960 p->count, 970 p->count,
961 prt_names(p->type, v4l2_type_names), 971 prt_names(p->type, v4l2_type_names),
@@ -966,13 +976,13 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
966 { 976 {
967 struct v4l2_buffer *p = arg; 977 struct v4l2_buffer *p = arg;
968 978
969 if (!vfd->vidioc_querybuf) 979 if (!ops->vidioc_querybuf)
970 break; 980 break;
971 ret = check_fmt(vfd, p->type); 981 ret = check_fmt(ops, p->type);
972 if (ret) 982 if (ret)
973 break; 983 break;
974 984
975 ret = vfd->vidioc_querybuf(file, fh, p); 985 ret = ops->vidioc_querybuf(file, fh, p);
976 if (!ret) 986 if (!ret)
977 dbgbuf(cmd, vfd, p); 987 dbgbuf(cmd, vfd, p);
978 break; 988 break;
@@ -981,13 +991,13 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
981 { 991 {
982 struct v4l2_buffer *p = arg; 992 struct v4l2_buffer *p = arg;
983 993
984 if (!vfd->vidioc_qbuf) 994 if (!ops->vidioc_qbuf)
985 break; 995 break;
986 ret = check_fmt(vfd, p->type); 996 ret = check_fmt(ops, p->type);
987 if (ret) 997 if (ret)
988 break; 998 break;
989 999
990 ret = vfd->vidioc_qbuf(file, fh, p); 1000 ret = ops->vidioc_qbuf(file, fh, p);
991 if (!ret) 1001 if (!ret)
992 dbgbuf(cmd, vfd, p); 1002 dbgbuf(cmd, vfd, p);
993 break; 1003 break;
@@ -996,13 +1006,13 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
996 { 1006 {
997 struct v4l2_buffer *p = arg; 1007 struct v4l2_buffer *p = arg;
998 1008
999 if (!vfd->vidioc_dqbuf) 1009 if (!ops->vidioc_dqbuf)
1000 break; 1010 break;
1001 ret = check_fmt(vfd, p->type); 1011 ret = check_fmt(ops, p->type);
1002 if (ret) 1012 if (ret)
1003 break; 1013 break;
1004 1014
1005 ret = vfd->vidioc_dqbuf(file, fh, p); 1015 ret = ops->vidioc_dqbuf(file, fh, p);
1006 if (!ret) 1016 if (!ret)
1007 dbgbuf(cmd, vfd, p); 1017 dbgbuf(cmd, vfd, p);
1008 break; 1018 break;
@@ -1011,19 +1021,19 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1011 { 1021 {
1012 int *i = arg; 1022 int *i = arg;
1013 1023
1014 if (!vfd->vidioc_overlay) 1024 if (!ops->vidioc_overlay)
1015 break; 1025 break;
1016 dbgarg(cmd, "value=%d\n", *i); 1026 dbgarg(cmd, "value=%d\n", *i);
1017 ret = vfd->vidioc_overlay(file, fh, *i); 1027 ret = ops->vidioc_overlay(file, fh, *i);
1018 break; 1028 break;
1019 } 1029 }
1020 case VIDIOC_G_FBUF: 1030 case VIDIOC_G_FBUF:
1021 { 1031 {
1022 struct v4l2_framebuffer *p = arg; 1032 struct v4l2_framebuffer *p = arg;
1023 1033
1024 if (!vfd->vidioc_g_fbuf) 1034 if (!ops->vidioc_g_fbuf)
1025 break; 1035 break;
1026 ret = vfd->vidioc_g_fbuf(file, fh, arg); 1036 ret = ops->vidioc_g_fbuf(file, fh, arg);
1027 if (!ret) { 1037 if (!ret) {
1028 dbgarg(cmd, "capability=0x%x, flags=%d, base=0x%08lx\n", 1038 dbgarg(cmd, "capability=0x%x, flags=%d, base=0x%08lx\n",
1029 p->capability, p->flags, 1039 p->capability, p->flags,
@@ -1036,32 +1046,32 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1036 { 1046 {
1037 struct v4l2_framebuffer *p = arg; 1047 struct v4l2_framebuffer *p = arg;
1038 1048
1039 if (!vfd->vidioc_s_fbuf) 1049 if (!ops->vidioc_s_fbuf)
1040 break; 1050 break;
1041 dbgarg(cmd, "capability=0x%x, flags=%d, base=0x%08lx\n", 1051 dbgarg(cmd, "capability=0x%x, flags=%d, base=0x%08lx\n",
1042 p->capability, p->flags, (unsigned long)p->base); 1052 p->capability, p->flags, (unsigned long)p->base);
1043 v4l_print_pix_fmt(vfd, &p->fmt); 1053 v4l_print_pix_fmt(vfd, &p->fmt);
1044 ret = vfd->vidioc_s_fbuf(file, fh, arg); 1054 ret = ops->vidioc_s_fbuf(file, fh, arg);
1045 break; 1055 break;
1046 } 1056 }
1047 case VIDIOC_STREAMON: 1057 case VIDIOC_STREAMON:
1048 { 1058 {
1049 enum v4l2_buf_type i = *(int *)arg; 1059 enum v4l2_buf_type i = *(int *)arg;
1050 1060
1051 if (!vfd->vidioc_streamon) 1061 if (!ops->vidioc_streamon)
1052 break; 1062 break;
1053 dbgarg(cmd, "type=%s\n", prt_names(i, v4l2_type_names)); 1063 dbgarg(cmd, "type=%s\n", prt_names(i, v4l2_type_names));
1054 ret = vfd->vidioc_streamon(file, fh, i); 1064 ret = ops->vidioc_streamon(file, fh, i);
1055 break; 1065 break;
1056 } 1066 }
1057 case VIDIOC_STREAMOFF: 1067 case VIDIOC_STREAMOFF:
1058 { 1068 {
1059 enum v4l2_buf_type i = *(int *)arg; 1069 enum v4l2_buf_type i = *(int *)arg;
1060 1070
1061 if (!vfd->vidioc_streamoff) 1071 if (!ops->vidioc_streamoff)
1062 break; 1072 break;
1063 dbgarg(cmd, "type=%s\n", prt_names(i, v4l2_type_names)); 1073 dbgarg(cmd, "type=%s\n", prt_names(i, v4l2_type_names));
1064 ret = vfd->vidioc_streamoff(file, fh, i); 1074 ret = ops->vidioc_streamoff(file, fh, i);
1065 break; 1075 break;
1066 } 1076 }
1067 /* ---------- tv norms ---------- */ 1077 /* ---------- tv norms ---------- */
@@ -1110,8 +1120,8 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1110 1120
1111 ret = 0; 1121 ret = 0;
1112 /* Calls the specific handler */ 1122 /* Calls the specific handler */
1113 if (vfd->vidioc_g_std) 1123 if (ops->vidioc_g_std)
1114 ret = vfd->vidioc_g_std(file, fh, id); 1124 ret = ops->vidioc_g_std(file, fh, id);
1115 else 1125 else
1116 *id = vfd->current_norm; 1126 *id = vfd->current_norm;
1117 1127
@@ -1130,8 +1140,8 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1130 break; 1140 break;
1131 1141
1132 /* Calls the specific handler */ 1142 /* Calls the specific handler */
1133 if (vfd->vidioc_s_std) 1143 if (ops->vidioc_s_std)
1134 ret = vfd->vidioc_s_std(file, fh, &norm); 1144 ret = ops->vidioc_s_std(file, fh, &norm);
1135 else 1145 else
1136 ret = -EINVAL; 1146 ret = -EINVAL;
1137 1147
@@ -1144,9 +1154,9 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1144 { 1154 {
1145 v4l2_std_id *p = arg; 1155 v4l2_std_id *p = arg;
1146 1156
1147 if (!vfd->vidioc_querystd) 1157 if (!ops->vidioc_querystd)
1148 break; 1158 break;
1149 ret = vfd->vidioc_querystd(file, fh, arg); 1159 ret = ops->vidioc_querystd(file, fh, arg);
1150 if (!ret) 1160 if (!ret)
1151 dbgarg(cmd, "detected std=%08Lx\n", 1161 dbgarg(cmd, "detected std=%08Lx\n",
1152 (unsigned long long)*p); 1162 (unsigned long long)*p);
@@ -1159,12 +1169,12 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1159 struct v4l2_input *p = arg; 1169 struct v4l2_input *p = arg;
1160 int i = p->index; 1170 int i = p->index;
1161 1171
1162 if (!vfd->vidioc_enum_input) 1172 if (!ops->vidioc_enum_input)
1163 break; 1173 break;
1164 memset(p, 0, sizeof(*p)); 1174 memset(p, 0, sizeof(*p));
1165 p->index = i; 1175 p->index = i;
1166 1176
1167 ret = vfd->vidioc_enum_input(file, fh, p); 1177 ret = ops->vidioc_enum_input(file, fh, p);
1168 if (!ret) 1178 if (!ret)
1169 dbgarg(cmd, "index=%d, name=%s, type=%d, " 1179 dbgarg(cmd, "index=%d, name=%s, type=%d, "
1170 "audioset=%d, " 1180 "audioset=%d, "
@@ -1179,9 +1189,9 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1179 { 1189 {
1180 unsigned int *i = arg; 1190 unsigned int *i = arg;
1181 1191
1182 if (!vfd->vidioc_g_input) 1192 if (!ops->vidioc_g_input)
1183 break; 1193 break;
1184 ret = vfd->vidioc_g_input(file, fh, i); 1194 ret = ops->vidioc_g_input(file, fh, i);
1185 if (!ret) 1195 if (!ret)
1186 dbgarg(cmd, "value=%d\n", *i); 1196 dbgarg(cmd, "value=%d\n", *i);
1187 break; 1197 break;
@@ -1190,10 +1200,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1190 { 1200 {
1191 unsigned int *i = arg; 1201 unsigned int *i = arg;
1192 1202
1193 if (!vfd->vidioc_s_input) 1203 if (!ops->vidioc_s_input)
1194 break; 1204 break;
1195 dbgarg(cmd, "value=%d\n", *i); 1205 dbgarg(cmd, "value=%d\n", *i);
1196 ret = vfd->vidioc_s_input(file, fh, *i); 1206 ret = ops->vidioc_s_input(file, fh, *i);
1197 break; 1207 break;
1198 } 1208 }
1199 1209
@@ -1203,12 +1213,12 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1203 struct v4l2_output *p = arg; 1213 struct v4l2_output *p = arg;
1204 int i = p->index; 1214 int i = p->index;
1205 1215
1206 if (!vfd->vidioc_enum_output) 1216 if (!ops->vidioc_enum_output)
1207 break; 1217 break;
1208 memset(p, 0, sizeof(*p)); 1218 memset(p, 0, sizeof(*p));
1209 p->index = i; 1219 p->index = i;
1210 1220
1211 ret = vfd->vidioc_enum_output(file, fh, p); 1221 ret = ops->vidioc_enum_output(file, fh, p);
1212 if (!ret) 1222 if (!ret)
1213 dbgarg(cmd, "index=%d, name=%s, type=%d, " 1223 dbgarg(cmd, "index=%d, name=%s, type=%d, "
1214 "audioset=0x%x, " 1224 "audioset=0x%x, "
@@ -1221,9 +1231,9 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1221 { 1231 {
1222 unsigned int *i = arg; 1232 unsigned int *i = arg;
1223 1233
1224 if (!vfd->vidioc_g_output) 1234 if (!ops->vidioc_g_output)
1225 break; 1235 break;
1226 ret = vfd->vidioc_g_output(file, fh, i); 1236 ret = ops->vidioc_g_output(file, fh, i);
1227 if (!ret) 1237 if (!ret)
1228 dbgarg(cmd, "value=%d\n", *i); 1238 dbgarg(cmd, "value=%d\n", *i);
1229 break; 1239 break;
@@ -1232,10 +1242,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1232 { 1242 {
1233 unsigned int *i = arg; 1243 unsigned int *i = arg;
1234 1244
1235 if (!vfd->vidioc_s_output) 1245 if (!ops->vidioc_s_output)
1236 break; 1246 break;
1237 dbgarg(cmd, "value=%d\n", *i); 1247 dbgarg(cmd, "value=%d\n", *i);
1238 ret = vfd->vidioc_s_output(file, fh, *i); 1248 ret = ops->vidioc_s_output(file, fh, *i);
1239 break; 1249 break;
1240 } 1250 }
1241 1251
@@ -1244,9 +1254,9 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1244 { 1254 {
1245 struct v4l2_queryctrl *p = arg; 1255 struct v4l2_queryctrl *p = arg;
1246 1256
1247 if (!vfd->vidioc_queryctrl) 1257 if (!ops->vidioc_queryctrl)
1248 break; 1258 break;
1249 ret = vfd->vidioc_queryctrl(file, fh, p); 1259 ret = ops->vidioc_queryctrl(file, fh, p);
1250 if (!ret) 1260 if (!ret)
1251 dbgarg(cmd, "id=0x%x, type=%d, name=%s, min/max=%d/%d, " 1261 dbgarg(cmd, "id=0x%x, type=%d, name=%s, min/max=%d/%d, "
1252 "step=%d, default=%d, flags=0x%08x\n", 1262 "step=%d, default=%d, flags=0x%08x\n",
@@ -1261,9 +1271,9 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1261 { 1271 {
1262 struct v4l2_control *p = arg; 1272 struct v4l2_control *p = arg;
1263 1273
1264 if (vfd->vidioc_g_ctrl) 1274 if (ops->vidioc_g_ctrl)
1265 ret = vfd->vidioc_g_ctrl(file, fh, p); 1275 ret = ops->vidioc_g_ctrl(file, fh, p);
1266 else if (vfd->vidioc_g_ext_ctrls) { 1276 else if (ops->vidioc_g_ext_ctrls) {
1267 struct v4l2_ext_controls ctrls; 1277 struct v4l2_ext_controls ctrls;
1268 struct v4l2_ext_control ctrl; 1278 struct v4l2_ext_control ctrl;
1269 1279
@@ -1273,7 +1283,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1273 ctrl.id = p->id; 1283 ctrl.id = p->id;
1274 ctrl.value = p->value; 1284 ctrl.value = p->value;
1275 if (check_ext_ctrls(&ctrls, 1)) { 1285 if (check_ext_ctrls(&ctrls, 1)) {
1276 ret = vfd->vidioc_g_ext_ctrls(file, fh, &ctrls); 1286 ret = ops->vidioc_g_ext_ctrls(file, fh, &ctrls);
1277 if (ret == 0) 1287 if (ret == 0)
1278 p->value = ctrl.value; 1288 p->value = ctrl.value;
1279 } 1289 }
@@ -1291,16 +1301,16 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1291 struct v4l2_ext_controls ctrls; 1301 struct v4l2_ext_controls ctrls;
1292 struct v4l2_ext_control ctrl; 1302 struct v4l2_ext_control ctrl;
1293 1303
1294 if (!vfd->vidioc_s_ctrl && !vfd->vidioc_s_ext_ctrls) 1304 if (!ops->vidioc_s_ctrl && !ops->vidioc_s_ext_ctrls)
1295 break; 1305 break;
1296 1306
1297 dbgarg(cmd, "id=0x%x, value=%d\n", p->id, p->value); 1307 dbgarg(cmd, "id=0x%x, value=%d\n", p->id, p->value);
1298 1308
1299 if (vfd->vidioc_s_ctrl) { 1309 if (ops->vidioc_s_ctrl) {
1300 ret = vfd->vidioc_s_ctrl(file, fh, p); 1310 ret = ops->vidioc_s_ctrl(file, fh, p);
1301 break; 1311 break;
1302 } 1312 }
1303 if (!vfd->vidioc_s_ext_ctrls) 1313 if (!ops->vidioc_s_ext_ctrls)
1304 break; 1314 break;
1305 1315
1306 ctrls.ctrl_class = V4L2_CTRL_ID2CLASS(p->id); 1316 ctrls.ctrl_class = V4L2_CTRL_ID2CLASS(p->id);
@@ -1309,7 +1319,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1309 ctrl.id = p->id; 1319 ctrl.id = p->id;
1310 ctrl.value = p->value; 1320 ctrl.value = p->value;
1311 if (check_ext_ctrls(&ctrls, 1)) 1321 if (check_ext_ctrls(&ctrls, 1))
1312 ret = vfd->vidioc_s_ext_ctrls(file, fh, &ctrls); 1322 ret = ops->vidioc_s_ext_ctrls(file, fh, &ctrls);
1313 break; 1323 break;
1314 } 1324 }
1315 case VIDIOC_G_EXT_CTRLS: 1325 case VIDIOC_G_EXT_CTRLS:
@@ -1317,10 +1327,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1317 struct v4l2_ext_controls *p = arg; 1327 struct v4l2_ext_controls *p = arg;
1318 1328
1319 p->error_idx = p->count; 1329 p->error_idx = p->count;
1320 if (!vfd->vidioc_g_ext_ctrls) 1330 if (!ops->vidioc_g_ext_ctrls)
1321 break; 1331 break;
1322 if (check_ext_ctrls(p, 0)) 1332 if (check_ext_ctrls(p, 0))
1323 ret = vfd->vidioc_g_ext_ctrls(file, fh, p); 1333 ret = ops->vidioc_g_ext_ctrls(file, fh, p);
1324 v4l_print_ext_ctrls(cmd, vfd, p, !ret); 1334 v4l_print_ext_ctrls(cmd, vfd, p, !ret);
1325 break; 1335 break;
1326 } 1336 }
@@ -1329,11 +1339,11 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1329 struct v4l2_ext_controls *p = arg; 1339 struct v4l2_ext_controls *p = arg;
1330 1340
1331 p->error_idx = p->count; 1341 p->error_idx = p->count;
1332 if (!vfd->vidioc_s_ext_ctrls) 1342 if (!ops->vidioc_s_ext_ctrls)
1333 break; 1343 break;
1334 v4l_print_ext_ctrls(cmd, vfd, p, 1); 1344 v4l_print_ext_ctrls(cmd, vfd, p, 1);
1335 if (check_ext_ctrls(p, 0)) 1345 if (check_ext_ctrls(p, 0))
1336 ret = vfd->vidioc_s_ext_ctrls(file, fh, p); 1346 ret = ops->vidioc_s_ext_ctrls(file, fh, p);
1337 break; 1347 break;
1338 } 1348 }
1339 case VIDIOC_TRY_EXT_CTRLS: 1349 case VIDIOC_TRY_EXT_CTRLS:
@@ -1341,20 +1351,20 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1341 struct v4l2_ext_controls *p = arg; 1351 struct v4l2_ext_controls *p = arg;
1342 1352
1343 p->error_idx = p->count; 1353 p->error_idx = p->count;
1344 if (!vfd->vidioc_try_ext_ctrls) 1354 if (!ops->vidioc_try_ext_ctrls)
1345 break; 1355 break;
1346 v4l_print_ext_ctrls(cmd, vfd, p, 1); 1356 v4l_print_ext_ctrls(cmd, vfd, p, 1);
1347 if (check_ext_ctrls(p, 0)) 1357 if (check_ext_ctrls(p, 0))
1348 ret = vfd->vidioc_try_ext_ctrls(file, fh, p); 1358 ret = ops->vidioc_try_ext_ctrls(file, fh, p);
1349 break; 1359 break;
1350 } 1360 }
1351 case VIDIOC_QUERYMENU: 1361 case VIDIOC_QUERYMENU:
1352 { 1362 {
1353 struct v4l2_querymenu *p = arg; 1363 struct v4l2_querymenu *p = arg;
1354 1364
1355 if (!vfd->vidioc_querymenu) 1365 if (!ops->vidioc_querymenu)
1356 break; 1366 break;
1357 ret = vfd->vidioc_querymenu(file, fh, p); 1367 ret = ops->vidioc_querymenu(file, fh, p);
1358 if (!ret) 1368 if (!ret)
1359 dbgarg(cmd, "id=0x%x, index=%d, name=%s\n", 1369 dbgarg(cmd, "id=0x%x, index=%d, name=%s\n",
1360 p->id, p->index, p->name); 1370 p->id, p->index, p->name);
@@ -1368,9 +1378,9 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1368 { 1378 {
1369 struct v4l2_audio *p = arg; 1379 struct v4l2_audio *p = arg;
1370 1380
1371 if (!vfd->vidioc_enumaudio) 1381 if (!ops->vidioc_enumaudio)
1372 break; 1382 break;
1373 ret = vfd->vidioc_enumaudio(file, fh, p); 1383 ret = ops->vidioc_enumaudio(file, fh, p);
1374 if (!ret) 1384 if (!ret)
1375 dbgarg(cmd, "index=%d, name=%s, capability=0x%x, " 1385 dbgarg(cmd, "index=%d, name=%s, capability=0x%x, "
1376 "mode=0x%x\n", p->index, p->name, 1386 "mode=0x%x\n", p->index, p->name,
@@ -1384,12 +1394,12 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1384 struct v4l2_audio *p = arg; 1394 struct v4l2_audio *p = arg;
1385 __u32 index = p->index; 1395 __u32 index = p->index;
1386 1396
1387 if (!vfd->vidioc_g_audio) 1397 if (!ops->vidioc_g_audio)
1388 break; 1398 break;
1389 1399
1390 memset(p, 0, sizeof(*p)); 1400 memset(p, 0, sizeof(*p));
1391 p->index = index; 1401 p->index = index;
1392 ret = vfd->vidioc_g_audio(file, fh, p); 1402 ret = ops->vidioc_g_audio(file, fh, p);
1393 if (!ret) 1403 if (!ret)
1394 dbgarg(cmd, "index=%d, name=%s, capability=0x%x, " 1404 dbgarg(cmd, "index=%d, name=%s, capability=0x%x, "
1395 "mode=0x%x\n", p->index, 1405 "mode=0x%x\n", p->index,
@@ -1402,22 +1412,22 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1402 { 1412 {
1403 struct v4l2_audio *p = arg; 1413 struct v4l2_audio *p = arg;
1404 1414
1405 if (!vfd->vidioc_s_audio) 1415 if (!ops->vidioc_s_audio)
1406 break; 1416 break;
1407 dbgarg(cmd, "index=%d, name=%s, capability=0x%x, " 1417 dbgarg(cmd, "index=%d, name=%s, capability=0x%x, "
1408 "mode=0x%x\n", p->index, p->name, 1418 "mode=0x%x\n", p->index, p->name,
1409 p->capability, p->mode); 1419 p->capability, p->mode);
1410 ret = vfd->vidioc_s_audio(file, fh, p); 1420 ret = ops->vidioc_s_audio(file, fh, p);
1411 break; 1421 break;
1412 } 1422 }
1413 case VIDIOC_ENUMAUDOUT: 1423 case VIDIOC_ENUMAUDOUT:
1414 { 1424 {
1415 struct v4l2_audioout *p = arg; 1425 struct v4l2_audioout *p = arg;
1416 1426
1417 if (!vfd->vidioc_enumaudout) 1427 if (!ops->vidioc_enumaudout)
1418 break; 1428 break;
1419 dbgarg(cmd, "Enum for index=%d\n", p->index); 1429 dbgarg(cmd, "Enum for index=%d\n", p->index);
1420 ret = vfd->vidioc_enumaudout(file, fh, p); 1430 ret = ops->vidioc_enumaudout(file, fh, p);
1421 if (!ret) 1431 if (!ret)
1422 dbgarg2("index=%d, name=%s, capability=%d, " 1432 dbgarg2("index=%d, name=%s, capability=%d, "
1423 "mode=%d\n", p->index, p->name, 1433 "mode=%d\n", p->index, p->name,
@@ -1428,10 +1438,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1428 { 1438 {
1429 struct v4l2_audioout *p = arg; 1439 struct v4l2_audioout *p = arg;
1430 1440
1431 if (!vfd->vidioc_g_audout) 1441 if (!ops->vidioc_g_audout)
1432 break; 1442 break;
1433 dbgarg(cmd, "Enum for index=%d\n", p->index); 1443 dbgarg(cmd, "Enum for index=%d\n", p->index);
1434 ret = vfd->vidioc_g_audout(file, fh, p); 1444 ret = ops->vidioc_g_audout(file, fh, p);
1435 if (!ret) 1445 if (!ret)
1436 dbgarg2("index=%d, name=%s, capability=%d, " 1446 dbgarg2("index=%d, name=%s, capability=%d, "
1437 "mode=%d\n", p->index, p->name, 1447 "mode=%d\n", p->index, p->name,
@@ -1442,22 +1452,22 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1442 { 1452 {
1443 struct v4l2_audioout *p = arg; 1453 struct v4l2_audioout *p = arg;
1444 1454
1445 if (!vfd->vidioc_s_audout) 1455 if (!ops->vidioc_s_audout)
1446 break; 1456 break;
1447 dbgarg(cmd, "index=%d, name=%s, capability=%d, " 1457 dbgarg(cmd, "index=%d, name=%s, capability=%d, "
1448 "mode=%d\n", p->index, p->name, 1458 "mode=%d\n", p->index, p->name,
1449 p->capability, p->mode); 1459 p->capability, p->mode);
1450 1460
1451 ret = vfd->vidioc_s_audout(file, fh, p); 1461 ret = ops->vidioc_s_audout(file, fh, p);
1452 break; 1462 break;
1453 } 1463 }
1454 case VIDIOC_G_MODULATOR: 1464 case VIDIOC_G_MODULATOR:
1455 { 1465 {
1456 struct v4l2_modulator *p = arg; 1466 struct v4l2_modulator *p = arg;
1457 1467
1458 if (!vfd->vidioc_g_modulator) 1468 if (!ops->vidioc_g_modulator)
1459 break; 1469 break;
1460 ret = vfd->vidioc_g_modulator(file, fh, p); 1470 ret = ops->vidioc_g_modulator(file, fh, p);
1461 if (!ret) 1471 if (!ret)
1462 dbgarg(cmd, "index=%d, name=%s, " 1472 dbgarg(cmd, "index=%d, name=%s, "
1463 "capability=%d, rangelow=%d," 1473 "capability=%d, rangelow=%d,"
@@ -1471,23 +1481,23 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1471 { 1481 {
1472 struct v4l2_modulator *p = arg; 1482 struct v4l2_modulator *p = arg;
1473 1483
1474 if (!vfd->vidioc_s_modulator) 1484 if (!ops->vidioc_s_modulator)
1475 break; 1485 break;
1476 dbgarg(cmd, "index=%d, name=%s, capability=%d, " 1486 dbgarg(cmd, "index=%d, name=%s, capability=%d, "
1477 "rangelow=%d, rangehigh=%d, txsubchans=%d\n", 1487 "rangelow=%d, rangehigh=%d, txsubchans=%d\n",
1478 p->index, p->name, p->capability, p->rangelow, 1488 p->index, p->name, p->capability, p->rangelow,
1479 p->rangehigh, p->txsubchans); 1489 p->rangehigh, p->txsubchans);
1480 ret = vfd->vidioc_s_modulator(file, fh, p); 1490 ret = ops->vidioc_s_modulator(file, fh, p);
1481 break; 1491 break;
1482 } 1492 }
1483 case VIDIOC_G_CROP: 1493 case VIDIOC_G_CROP:
1484 { 1494 {
1485 struct v4l2_crop *p = arg; 1495 struct v4l2_crop *p = arg;
1486 1496
1487 if (!vfd->vidioc_g_crop) 1497 if (!ops->vidioc_g_crop)
1488 break; 1498 break;
1489 dbgarg(cmd, "type=%s\n", prt_names(p->type, v4l2_type_names)); 1499 dbgarg(cmd, "type=%s\n", prt_names(p->type, v4l2_type_names));
1490 ret = vfd->vidioc_g_crop(file, fh, p); 1500 ret = ops->vidioc_g_crop(file, fh, p);
1491 if (!ret) 1501 if (!ret)
1492 dbgrect(vfd, "", &p->c); 1502 dbgrect(vfd, "", &p->c);
1493 break; 1503 break;
@@ -1496,11 +1506,11 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1496 { 1506 {
1497 struct v4l2_crop *p = arg; 1507 struct v4l2_crop *p = arg;
1498 1508
1499 if (!vfd->vidioc_s_crop) 1509 if (!ops->vidioc_s_crop)
1500 break; 1510 break;
1501 dbgarg(cmd, "type=%s\n", prt_names(p->type, v4l2_type_names)); 1511 dbgarg(cmd, "type=%s\n", prt_names(p->type, v4l2_type_names));
1502 dbgrect(vfd, "", &p->c); 1512 dbgrect(vfd, "", &p->c);
1503 ret = vfd->vidioc_s_crop(file, fh, p); 1513 ret = ops->vidioc_s_crop(file, fh, p);
1504 break; 1514 break;
1505 } 1515 }
1506 case VIDIOC_CROPCAP: 1516 case VIDIOC_CROPCAP:
@@ -1508,10 +1518,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1508 struct v4l2_cropcap *p = arg; 1518 struct v4l2_cropcap *p = arg;
1509 1519
1510 /*FIXME: Should also show v4l2_fract pixelaspect */ 1520 /*FIXME: Should also show v4l2_fract pixelaspect */
1511 if (!vfd->vidioc_cropcap) 1521 if (!ops->vidioc_cropcap)
1512 break; 1522 break;
1513 dbgarg(cmd, "type=%s\n", prt_names(p->type, v4l2_type_names)); 1523 dbgarg(cmd, "type=%s\n", prt_names(p->type, v4l2_type_names));
1514 ret = vfd->vidioc_cropcap(file, fh, p); 1524 ret = ops->vidioc_cropcap(file, fh, p);
1515 if (!ret) { 1525 if (!ret) {
1516 dbgrect(vfd, "bounds ", &p->bounds); 1526 dbgrect(vfd, "bounds ", &p->bounds);
1517 dbgrect(vfd, "defrect ", &p->defrect); 1527 dbgrect(vfd, "defrect ", &p->defrect);
@@ -1522,9 +1532,9 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1522 { 1532 {
1523 struct v4l2_jpegcompression *p = arg; 1533 struct v4l2_jpegcompression *p = arg;
1524 1534
1525 if (!vfd->vidioc_g_jpegcomp) 1535 if (!ops->vidioc_g_jpegcomp)
1526 break; 1536 break;
1527 ret = vfd->vidioc_g_jpegcomp(file, fh, p); 1537 ret = ops->vidioc_g_jpegcomp(file, fh, p);
1528 if (!ret) 1538 if (!ret)
1529 dbgarg(cmd, "quality=%d, APPn=%d, " 1539 dbgarg(cmd, "quality=%d, APPn=%d, "
1530 "APP_len=%d, COM_len=%d, " 1540 "APP_len=%d, COM_len=%d, "
@@ -1537,22 +1547,22 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1537 { 1547 {
1538 struct v4l2_jpegcompression *p = arg; 1548 struct v4l2_jpegcompression *p = arg;
1539 1549
1540 if (!vfd->vidioc_g_jpegcomp) 1550 if (!ops->vidioc_g_jpegcomp)
1541 break; 1551 break;
1542 dbgarg(cmd, "quality=%d, APPn=%d, APP_len=%d, " 1552 dbgarg(cmd, "quality=%d, APPn=%d, APP_len=%d, "
1543 "COM_len=%d, jpeg_markers=%d\n", 1553 "COM_len=%d, jpeg_markers=%d\n",
1544 p->quality, p->APPn, p->APP_len, 1554 p->quality, p->APPn, p->APP_len,
1545 p->COM_len, p->jpeg_markers); 1555 p->COM_len, p->jpeg_markers);
1546 ret = vfd->vidioc_s_jpegcomp(file, fh, p); 1556 ret = ops->vidioc_s_jpegcomp(file, fh, p);
1547 break; 1557 break;
1548 } 1558 }
1549 case VIDIOC_G_ENC_INDEX: 1559 case VIDIOC_G_ENC_INDEX:
1550 { 1560 {
1551 struct v4l2_enc_idx *p = arg; 1561 struct v4l2_enc_idx *p = arg;
1552 1562
1553 if (!vfd->vidioc_g_enc_index) 1563 if (!ops->vidioc_g_enc_index)
1554 break; 1564 break;
1555 ret = vfd->vidioc_g_enc_index(file, fh, p); 1565 ret = ops->vidioc_g_enc_index(file, fh, p);
1556 if (!ret) 1566 if (!ret)
1557 dbgarg(cmd, "entries=%d, entries_cap=%d\n", 1567 dbgarg(cmd, "entries=%d, entries_cap=%d\n",
1558 p->entries, p->entries_cap); 1568 p->entries, p->entries_cap);
@@ -1562,10 +1572,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1562 { 1572 {
1563 struct v4l2_encoder_cmd *p = arg; 1573 struct v4l2_encoder_cmd *p = arg;
1564 1574
1565 if (!vfd->vidioc_encoder_cmd) 1575 if (!ops->vidioc_encoder_cmd)
1566 break; 1576 break;
1567 memset(&p->raw, 0, sizeof(p->raw)); 1577 memset(&p->raw, 0, sizeof(p->raw));
1568 ret = vfd->vidioc_encoder_cmd(file, fh, p); 1578 ret = ops->vidioc_encoder_cmd(file, fh, p);
1569 if (!ret) 1579 if (!ret)
1570 dbgarg(cmd, "cmd=%d, flags=%x\n", p->cmd, p->flags); 1580 dbgarg(cmd, "cmd=%d, flags=%x\n", p->cmd, p->flags);
1571 break; 1581 break;
@@ -1574,10 +1584,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1574 { 1584 {
1575 struct v4l2_encoder_cmd *p = arg; 1585 struct v4l2_encoder_cmd *p = arg;
1576 1586
1577 if (!vfd->vidioc_try_encoder_cmd) 1587 if (!ops->vidioc_try_encoder_cmd)
1578 break; 1588 break;
1579 memset(&p->raw, 0, sizeof(p->raw)); 1589 memset(&p->raw, 0, sizeof(p->raw));
1580 ret = vfd->vidioc_try_encoder_cmd(file, fh, p); 1590 ret = ops->vidioc_try_encoder_cmd(file, fh, p);
1581 if (!ret) 1591 if (!ret)
1582 dbgarg(cmd, "cmd=%d, flags=%x\n", p->cmd, p->flags); 1592 dbgarg(cmd, "cmd=%d, flags=%x\n", p->cmd, p->flags);
1583 break; 1593 break;
@@ -1590,8 +1600,8 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1590 memset(p, 0, sizeof(*p)); 1600 memset(p, 0, sizeof(*p));
1591 p->type = type; 1601 p->type = type;
1592 1602
1593 if (vfd->vidioc_g_parm) { 1603 if (ops->vidioc_g_parm) {
1594 ret = vfd->vidioc_g_parm(file, fh, p); 1604 ret = ops->vidioc_g_parm(file, fh, p);
1595 } else { 1605 } else {
1596 struct v4l2_standard s; 1606 struct v4l2_standard s;
1597 1607
@@ -1612,10 +1622,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1612 { 1622 {
1613 struct v4l2_streamparm *p = arg; 1623 struct v4l2_streamparm *p = arg;
1614 1624
1615 if (!vfd->vidioc_s_parm) 1625 if (!ops->vidioc_s_parm)
1616 break; 1626 break;
1617 dbgarg(cmd, "type=%d\n", p->type); 1627 dbgarg(cmd, "type=%d\n", p->type);
1618 ret = vfd->vidioc_s_parm(file, fh, p); 1628 ret = ops->vidioc_s_parm(file, fh, p);
1619 break; 1629 break;
1620 } 1630 }
1621 case VIDIOC_G_TUNER: 1631 case VIDIOC_G_TUNER:
@@ -1623,13 +1633,13 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1623 struct v4l2_tuner *p = arg; 1633 struct v4l2_tuner *p = arg;
1624 __u32 index = p->index; 1634 __u32 index = p->index;
1625 1635
1626 if (!vfd->vidioc_g_tuner) 1636 if (!ops->vidioc_g_tuner)
1627 break; 1637 break;
1628 1638
1629 memset(p, 0, sizeof(*p)); 1639 memset(p, 0, sizeof(*p));
1630 p->index = index; 1640 p->index = index;
1631 1641
1632 ret = vfd->vidioc_g_tuner(file, fh, p); 1642 ret = ops->vidioc_g_tuner(file, fh, p);
1633 if (!ret) 1643 if (!ret)
1634 dbgarg(cmd, "index=%d, name=%s, type=%d, " 1644 dbgarg(cmd, "index=%d, name=%s, type=%d, "
1635 "capability=0x%x, rangelow=%d, " 1645 "capability=0x%x, rangelow=%d, "
@@ -1645,7 +1655,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1645 { 1655 {
1646 struct v4l2_tuner *p = arg; 1656 struct v4l2_tuner *p = arg;
1647 1657
1648 if (!vfd->vidioc_s_tuner) 1658 if (!ops->vidioc_s_tuner)
1649 break; 1659 break;
1650 dbgarg(cmd, "index=%d, name=%s, type=%d, " 1660 dbgarg(cmd, "index=%d, name=%s, type=%d, "
1651 "capability=0x%x, rangelow=%d, " 1661 "capability=0x%x, rangelow=%d, "
@@ -1655,19 +1665,19 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1655 p->capability, p->rangelow, 1665 p->capability, p->rangelow,
1656 p->rangehigh, p->signal, p->afc, 1666 p->rangehigh, p->signal, p->afc,
1657 p->rxsubchans, p->audmode); 1667 p->rxsubchans, p->audmode);
1658 ret = vfd->vidioc_s_tuner(file, fh, p); 1668 ret = ops->vidioc_s_tuner(file, fh, p);
1659 break; 1669 break;
1660 } 1670 }
1661 case VIDIOC_G_FREQUENCY: 1671 case VIDIOC_G_FREQUENCY:
1662 { 1672 {
1663 struct v4l2_frequency *p = arg; 1673 struct v4l2_frequency *p = arg;
1664 1674
1665 if (!vfd->vidioc_g_frequency) 1675 if (!ops->vidioc_g_frequency)
1666 break; 1676 break;
1667 1677
1668 memset(p->reserved, 0, sizeof(p->reserved)); 1678 memset(p->reserved, 0, sizeof(p->reserved));
1669 1679
1670 ret = vfd->vidioc_g_frequency(file, fh, p); 1680 ret = ops->vidioc_g_frequency(file, fh, p);
1671 if (!ret) 1681 if (!ret)
1672 dbgarg(cmd, "tuner=%d, type=%d, frequency=%d\n", 1682 dbgarg(cmd, "tuner=%d, type=%d, frequency=%d\n",
1673 p->tuner, p->type, p->frequency); 1683 p->tuner, p->type, p->frequency);
@@ -1677,11 +1687,11 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1677 { 1687 {
1678 struct v4l2_frequency *p = arg; 1688 struct v4l2_frequency *p = arg;
1679 1689
1680 if (!vfd->vidioc_s_frequency) 1690 if (!ops->vidioc_s_frequency)
1681 break; 1691 break;
1682 dbgarg(cmd, "tuner=%d, type=%d, frequency=%d\n", 1692 dbgarg(cmd, "tuner=%d, type=%d, frequency=%d\n",
1683 p->tuner, p->type, p->frequency); 1693 p->tuner, p->type, p->frequency);
1684 ret = vfd->vidioc_s_frequency(file, fh, p); 1694 ret = ops->vidioc_s_frequency(file, fh, p);
1685 break; 1695 break;
1686 } 1696 }
1687 case VIDIOC_G_SLICED_VBI_CAP: 1697 case VIDIOC_G_SLICED_VBI_CAP:
@@ -1689,21 +1699,21 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1689 struct v4l2_sliced_vbi_cap *p = arg; 1699 struct v4l2_sliced_vbi_cap *p = arg;
1690 __u32 type = p->type; 1700 __u32 type = p->type;
1691 1701
1692 if (!vfd->vidioc_g_sliced_vbi_cap) 1702 if (!ops->vidioc_g_sliced_vbi_cap)
1693 break; 1703 break;
1694 memset(p, 0, sizeof(*p)); 1704 memset(p, 0, sizeof(*p));
1695 p->type = type; 1705 p->type = type;
1696 dbgarg(cmd, "type=%s\n", prt_names(p->type, v4l2_type_names)); 1706 dbgarg(cmd, "type=%s\n", prt_names(p->type, v4l2_type_names));
1697 ret = vfd->vidioc_g_sliced_vbi_cap(file, fh, p); 1707 ret = ops->vidioc_g_sliced_vbi_cap(file, fh, p);
1698 if (!ret) 1708 if (!ret)
1699 dbgarg2("service_set=%d\n", p->service_set); 1709 dbgarg2("service_set=%d\n", p->service_set);
1700 break; 1710 break;
1701 } 1711 }
1702 case VIDIOC_LOG_STATUS: 1712 case VIDIOC_LOG_STATUS:
1703 { 1713 {
1704 if (!vfd->vidioc_log_status) 1714 if (!ops->vidioc_log_status)
1705 break; 1715 break;
1706 ret = vfd->vidioc_log_status(file, fh); 1716 ret = ops->vidioc_log_status(file, fh);
1707 break; 1717 break;
1708 } 1718 }
1709#ifdef CONFIG_VIDEO_ADV_DEBUG 1719#ifdef CONFIG_VIDEO_ADV_DEBUG
@@ -1713,8 +1723,8 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1713 1723
1714 if (!capable(CAP_SYS_ADMIN)) 1724 if (!capable(CAP_SYS_ADMIN))
1715 ret = -EPERM; 1725 ret = -EPERM;
1716 else if (vfd->vidioc_g_register) 1726 else if (ops->vidioc_g_register)
1717 ret = vfd->vidioc_g_register(file, fh, p); 1727 ret = ops->vidioc_g_register(file, fh, p);
1718 break; 1728 break;
1719 } 1729 }
1720 case VIDIOC_DBG_S_REGISTER: 1730 case VIDIOC_DBG_S_REGISTER:
@@ -1723,8 +1733,8 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1723 1733
1724 if (!capable(CAP_SYS_ADMIN)) 1734 if (!capable(CAP_SYS_ADMIN))
1725 ret = -EPERM; 1735 ret = -EPERM;
1726 else if (vfd->vidioc_s_register) 1736 else if (ops->vidioc_s_register)
1727 ret = vfd->vidioc_s_register(file, fh, p); 1737 ret = ops->vidioc_s_register(file, fh, p);
1728 break; 1738 break;
1729 } 1739 }
1730#endif 1740#endif
@@ -1732,30 +1742,30 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1732 { 1742 {
1733 struct v4l2_chip_ident *p = arg; 1743 struct v4l2_chip_ident *p = arg;
1734 1744
1735 if (!vfd->vidioc_g_chip_ident) 1745 if (!ops->vidioc_g_chip_ident)
1736 break; 1746 break;
1737 ret = vfd->vidioc_g_chip_ident(file, fh, p); 1747 ret = ops->vidioc_g_chip_ident(file, fh, p);
1738 if (!ret) 1748 if (!ret)
1739 dbgarg(cmd, "chip_ident=%u, revision=0x%x\n", p->ident, p->revision); 1749 dbgarg(cmd, "chip_ident=%u, revision=0x%x\n", p->ident, p->revision);
1740 break; 1750 break;
1741 } 1751 }
1742 default:
1743 {
1744 if (!vfd->vidioc_default)
1745 break;
1746 ret = vfd->vidioc_default(file, fh, cmd, arg);
1747 break;
1748 }
1749 case VIDIOC_S_HW_FREQ_SEEK: 1752 case VIDIOC_S_HW_FREQ_SEEK:
1750 { 1753 {
1751 struct v4l2_hw_freq_seek *p = arg; 1754 struct v4l2_hw_freq_seek *p = arg;
1752 1755
1753 if (!vfd->vidioc_s_hw_freq_seek) 1756 if (!ops->vidioc_s_hw_freq_seek)
1754 break; 1757 break;
1755 dbgarg(cmd, 1758 dbgarg(cmd,
1756 "tuner=%d, type=%d, seek_upward=%d, wrap_around=%d\n", 1759 "tuner=%d, type=%d, seek_upward=%d, wrap_around=%d\n",
1757 p->tuner, p->type, p->seek_upward, p->wrap_around); 1760 p->tuner, p->type, p->seek_upward, p->wrap_around);
1758 ret = vfd->vidioc_s_hw_freq_seek(file, fh, p); 1761 ret = ops->vidioc_s_hw_freq_seek(file, fh, p);
1762 break;
1763 }
1764 default:
1765 {
1766 if (!ops->vidioc_default)
1767 break;
1768 ret = ops->vidioc_default(file, fh, cmd, arg);
1759 break; 1769 break;
1760 } 1770 }
1761 } /* switch */ 1771 } /* switch */