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.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
index b96ce991d968..791e69d804f9 100644
--- a/drivers/media/video/cx88/cx88-video.c
+++ b/drivers/media/video/cx88/cx88-video.c
@@ -757,9 +757,9 @@ static int get_ressource(struct cx8800_fh *fh)
757 } 757 }
758} 758}
759 759
760static int video_open(struct inode *inode, struct file *file) 760static int video_open(struct file *file)
761{ 761{
762 int minor = iminor(inode); 762 int minor = video_devdata(file)->minor;
763 struct cx8800_dev *h,*dev = NULL; 763 struct cx8800_dev *h,*dev = NULL;
764 struct cx88_core *core; 764 struct cx88_core *core;
765 struct cx8800_fh *fh; 765 struct cx8800_fh *fh;
@@ -904,7 +904,7 @@ video_poll(struct file *file, struct poll_table_struct *wait)
904 return 0; 904 return 0;
905} 905}
906 906
907static int video_release(struct inode *inode, struct file *file) 907static int video_release(struct file *file)
908{ 908{
909 struct cx8800_fh *fh = file->private_data; 909 struct cx8800_fh *fh = file->private_data;
910 struct cx8800_dev *dev = fh->dev; 910 struct cx8800_dev *dev = fh->dev;
@@ -1447,25 +1447,26 @@ static int vidioc_s_frequency (struct file *file, void *priv,
1447 1447
1448#ifdef CONFIG_VIDEO_ADV_DEBUG 1448#ifdef CONFIG_VIDEO_ADV_DEBUG
1449static int vidioc_g_register (struct file *file, void *fh, 1449static int vidioc_g_register (struct file *file, void *fh,
1450 struct v4l2_register *reg) 1450 struct v4l2_dbg_register *reg)
1451{ 1451{
1452 struct cx88_core *core = ((struct cx8800_fh*)fh)->dev->core; 1452 struct cx88_core *core = ((struct cx8800_fh*)fh)->dev->core;
1453 1453
1454 if (!v4l2_chip_match_host(reg->match_type, reg->match_chip)) 1454 if (!v4l2_chip_match_host(&reg->match))
1455 return -EINVAL; 1455 return -EINVAL;
1456 /* cx2388x has a 24-bit register space */ 1456 /* cx2388x has a 24-bit register space */
1457 reg->val = cx_read(reg->reg&0xffffff); 1457 reg->val = cx_read(reg->reg & 0xffffff);
1458 reg->size = 4;
1458 return 0; 1459 return 0;
1459} 1460}
1460 1461
1461static int vidioc_s_register (struct file *file, void *fh, 1462static int vidioc_s_register (struct file *file, void *fh,
1462 struct v4l2_register *reg) 1463 struct v4l2_dbg_register *reg)
1463{ 1464{
1464 struct cx88_core *core = ((struct cx8800_fh*)fh)->dev->core; 1465 struct cx88_core *core = ((struct cx8800_fh*)fh)->dev->core;
1465 1466
1466 if (!v4l2_chip_match_host(reg->match_type, reg->match_chip)) 1467 if (!v4l2_chip_match_host(&reg->match))
1467 return -EINVAL; 1468 return -EINVAL;
1468 cx_write(reg->reg&0xffffff, reg->val); 1469 cx_write(reg->reg & 0xffffff, reg->val);
1469 return 0; 1470 return 0;
1470} 1471}
1471#endif 1472#endif
@@ -1693,7 +1694,7 @@ static irqreturn_t cx8800_irq(int irq, void *dev_id)
1693/* ----------------------------------------------------------- */ 1694/* ----------------------------------------------------------- */
1694/* exported stuff */ 1695/* exported stuff */
1695 1696
1696static const struct file_operations video_fops = 1697static const struct v4l2_file_operations video_fops =
1697{ 1698{
1698 .owner = THIS_MODULE, 1699 .owner = THIS_MODULE,
1699 .open = video_open, 1700 .open = video_open,
@@ -1702,8 +1703,6 @@ static const struct file_operations video_fops =
1702 .poll = video_poll, 1703 .poll = video_poll,
1703 .mmap = video_mmap, 1704 .mmap = video_mmap,
1704 .ioctl = video_ioctl2, 1705 .ioctl = video_ioctl2,
1705 .compat_ioctl = v4l_compat_ioctl32,
1706 .llseek = no_llseek,
1707}; 1706};
1708 1707
1709static const struct v4l2_ioctl_ops video_ioctl_ops = { 1708static const struct v4l2_ioctl_ops video_ioctl_ops = {
@@ -1752,14 +1751,12 @@ static struct video_device cx8800_video_template = {
1752 .current_norm = V4L2_STD_NTSC_M, 1751 .current_norm = V4L2_STD_NTSC_M,
1753}; 1752};
1754 1753
1755static const struct file_operations radio_fops = 1754static const struct v4l2_file_operations radio_fops =
1756{ 1755{
1757 .owner = THIS_MODULE, 1756 .owner = THIS_MODULE,
1758 .open = video_open, 1757 .open = video_open,
1759 .release = video_release, 1758 .release = video_release,
1760 .ioctl = video_ioctl2, 1759 .ioctl = video_ioctl2,
1761 .compat_ioctl = v4l_compat_ioctl32,
1762 .llseek = no_llseek,
1763}; 1760};
1764 1761
1765static const struct v4l2_ioctl_ops radio_ioctl_ops = { 1762static const struct v4l2_ioctl_ops radio_ioctl_ops = {