aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-video.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx88/cx88-video.c')
-rw-r--r--drivers/media/video/cx88/cx88-video.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
index 0fed5cd2ccea..ef4d56ea0027 100644
--- a/drivers/media/video/cx88/cx88-video.c
+++ b/drivers/media/video/cx88/cx88-video.c
@@ -39,6 +39,7 @@
39 39
40#include "cx88.h" 40#include "cx88.h"
41#include <media/v4l2-common.h> 41#include <media/v4l2-common.h>
42#include <media/v4l2-ioctl.h>
42 43
43#ifdef CONFIG_VIDEO_V4L1_COMPAT 44#ifdef CONFIG_VIDEO_V4L1_COMPAT
44/* Include V4L1 specific functions. Should be removed soon */ 45/* Include V4L1 specific functions. Should be removed soon */
@@ -447,7 +448,7 @@ int cx88_video_mux(struct cx88_core *core, unsigned int input)
447 the initialization. Some boards may use different 448 the initialization. Some boards may use different
448 routes for different inputs. HVR-1300 surely does */ 449 routes for different inputs. HVR-1300 surely does */
449 if (core->board.audio_chip && 450 if (core->board.audio_chip &&
450 core->board.audio_chip == AUDIO_CHIP_WM8775) { 451 core->board.audio_chip == V4L2_IDENT_WM8775) {
451 struct v4l2_routing route; 452 struct v4l2_routing route;
452 453
453 route.input = INPUT(input).audioroute; 454 route.input = INPUT(input).audioroute;
@@ -1682,13 +1683,7 @@ static const struct file_operations video_fops =
1682 .llseek = no_llseek, 1683 .llseek = no_llseek,
1683}; 1684};
1684 1685
1685static struct video_device cx8800_vbi_template; 1686static const struct v4l2_ioctl_ops video_ioctl_ops = {
1686static struct video_device cx8800_video_template =
1687{
1688 .name = "cx8800-video",
1689 .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_SCALES,
1690 .fops = &video_fops,
1691 .minor = -1,
1692 .vidioc_querycap = vidioc_querycap, 1687 .vidioc_querycap = vidioc_querycap,
1693 .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap, 1688 .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
1694 .vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap, 1689 .vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap,
@@ -1721,6 +1716,15 @@ static struct video_device cx8800_video_template =
1721 .vidioc_g_register = vidioc_g_register, 1716 .vidioc_g_register = vidioc_g_register,
1722 .vidioc_s_register = vidioc_s_register, 1717 .vidioc_s_register = vidioc_s_register,
1723#endif 1718#endif
1719};
1720
1721static struct video_device cx8800_vbi_template;
1722
1723static struct video_device cx8800_video_template = {
1724 .name = "cx8800-video",
1725 .fops = &video_fops,
1726 .minor = -1,
1727 .ioctl_ops = &video_ioctl_ops,
1724 .tvnorms = CX88_NORMS, 1728 .tvnorms = CX88_NORMS,
1725 .current_norm = V4L2_STD_NTSC_M, 1729 .current_norm = V4L2_STD_NTSC_M,
1726}; 1730};
@@ -1735,12 +1739,7 @@ static const struct file_operations radio_fops =
1735 .llseek = no_llseek, 1739 .llseek = no_llseek,
1736}; 1740};
1737 1741
1738static struct video_device cx8800_radio_template = 1742static const struct v4l2_ioctl_ops radio_ioctl_ops = {
1739{
1740 .name = "cx8800-radio",
1741 .type = VID_TYPE_TUNER,
1742 .fops = &radio_fops,
1743 .minor = -1,
1744 .vidioc_querycap = radio_querycap, 1743 .vidioc_querycap = radio_querycap,
1745 .vidioc_g_tuner = radio_g_tuner, 1744 .vidioc_g_tuner = radio_g_tuner,
1746 .vidioc_enum_input = radio_enum_input, 1745 .vidioc_enum_input = radio_enum_input,
@@ -1759,6 +1758,13 @@ static struct video_device cx8800_radio_template =
1759#endif 1758#endif
1760}; 1759};
1761 1760
1761static struct video_device cx8800_radio_template = {
1762 .name = "cx8800-radio",
1763 .fops = &radio_fops,
1764 .minor = -1,
1765 .ioctl_ops = &radio_ioctl_ops,
1766};
1767
1762/* ----------------------------------------------------------- */ 1768/* ----------------------------------------------------------- */
1763 1769
1764static void cx8800_unregister_video(struct cx8800_dev *dev) 1770static void cx8800_unregister_video(struct cx8800_dev *dev)
@@ -1830,7 +1836,6 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
1830 memcpy( &cx8800_vbi_template, &cx8800_video_template, 1836 memcpy( &cx8800_vbi_template, &cx8800_video_template,
1831 sizeof(cx8800_vbi_template) ); 1837 sizeof(cx8800_vbi_template) );
1832 strcpy(cx8800_vbi_template.name,"cx8800-vbi"); 1838 strcpy(cx8800_vbi_template.name,"cx8800-vbi");
1833 cx8800_vbi_template.type = VID_TYPE_TELETEXT|VID_TYPE_TUNER;
1834 1839
1835 /* initialize driver struct */ 1840 /* initialize driver struct */
1836 spin_lock_init(&dev->slock); 1841 spin_lock_init(&dev->slock);
@@ -1866,7 +1871,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
1866 1871
1867 /* load and configure helper modules */ 1872 /* load and configure helper modules */
1868 1873
1869 if (core->board.audio_chip == AUDIO_CHIP_WM8775) 1874 if (core->board.audio_chip == V4L2_IDENT_WM8775)
1870 request_module("wm8775"); 1875 request_module("wm8775");
1871 1876
1872 switch (core->boardnr) { 1877 switch (core->boardnr) {