diff options
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-video.c')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-video.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c index c742a10be5cb..2d81c4d04340 100644 --- a/drivers/media/video/cx23885/cx23885-video.c +++ b/drivers/media/video/cx23885/cx23885-video.c | |||
@@ -718,9 +718,9 @@ static int get_resource(struct cx23885_fh *fh) | |||
718 | } | 718 | } |
719 | } | 719 | } |
720 | 720 | ||
721 | static int video_open(struct inode *inode, struct file *file) | 721 | static int video_open(struct file *file) |
722 | { | 722 | { |
723 | int minor = iminor(inode); | 723 | int minor = video_devdata(file)->minor; |
724 | struct cx23885_dev *h, *dev = NULL; | 724 | struct cx23885_dev *h, *dev = NULL; |
725 | struct cx23885_fh *fh; | 725 | struct cx23885_fh *fh; |
726 | struct list_head *list; | 726 | struct list_head *list; |
@@ -834,7 +834,7 @@ static unsigned int video_poll(struct file *file, | |||
834 | return 0; | 834 | return 0; |
835 | } | 835 | } |
836 | 836 | ||
837 | static int video_release(struct inode *inode, struct file *file) | 837 | static int video_release(struct file *file) |
838 | { | 838 | { |
839 | struct cx23885_fh *fh = file->private_data; | 839 | struct cx23885_fh *fh = file->private_data; |
840 | struct cx23885_dev *dev = fh->dev; | 840 | struct cx23885_dev *dev = fh->dev; |
@@ -1326,11 +1326,11 @@ static int vidioc_s_frequency(struct file *file, void *priv, | |||
1326 | 1326 | ||
1327 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 1327 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
1328 | static int vidioc_g_register(struct file *file, void *fh, | 1328 | static int vidioc_g_register(struct file *file, void *fh, |
1329 | struct v4l2_register *reg) | 1329 | struct v4l2_dbg_register *reg) |
1330 | { | 1330 | { |
1331 | struct cx23885_dev *dev = ((struct cx23885_fh *)fh)->dev; | 1331 | struct cx23885_dev *dev = ((struct cx23885_fh *)fh)->dev; |
1332 | 1332 | ||
1333 | if (!v4l2_chip_match_host(reg->match_type, reg->match_chip)) | 1333 | if (!v4l2_chip_match_host(®->match)) |
1334 | return -EINVAL; | 1334 | return -EINVAL; |
1335 | 1335 | ||
1336 | cx23885_call_i2c_clients(&dev->i2c_bus[2], VIDIOC_DBG_G_REGISTER, reg); | 1336 | cx23885_call_i2c_clients(&dev->i2c_bus[2], VIDIOC_DBG_G_REGISTER, reg); |
@@ -1339,11 +1339,11 @@ static int vidioc_g_register(struct file *file, void *fh, | |||
1339 | } | 1339 | } |
1340 | 1340 | ||
1341 | static int vidioc_s_register(struct file *file, void *fh, | 1341 | static int vidioc_s_register(struct file *file, void *fh, |
1342 | struct v4l2_register *reg) | 1342 | struct v4l2_dbg_register *reg) |
1343 | { | 1343 | { |
1344 | struct cx23885_dev *dev = ((struct cx23885_fh *)fh)->dev; | 1344 | struct cx23885_dev *dev = ((struct cx23885_fh *)fh)->dev; |
1345 | 1345 | ||
1346 | if (!v4l2_chip_match_host(reg->match_type, reg->match_chip)) | 1346 | if (!v4l2_chip_match_host(®->match)) |
1347 | return -EINVAL; | 1347 | return -EINVAL; |
1348 | 1348 | ||
1349 | cx23885_call_i2c_clients(&dev->i2c_bus[2], VIDIOC_DBG_S_REGISTER, reg); | 1349 | cx23885_call_i2c_clients(&dev->i2c_bus[2], VIDIOC_DBG_S_REGISTER, reg); |
@@ -1422,7 +1422,7 @@ int cx23885_video_irq(struct cx23885_dev *dev, u32 status) | |||
1422 | /* ----------------------------------------------------------- */ | 1422 | /* ----------------------------------------------------------- */ |
1423 | /* exported stuff */ | 1423 | /* exported stuff */ |
1424 | 1424 | ||
1425 | static const struct file_operations video_fops = { | 1425 | static const struct v4l2_file_operations video_fops = { |
1426 | .owner = THIS_MODULE, | 1426 | .owner = THIS_MODULE, |
1427 | .open = video_open, | 1427 | .open = video_open, |
1428 | .release = video_release, | 1428 | .release = video_release, |
@@ -1430,8 +1430,6 @@ static const struct file_operations video_fops = { | |||
1430 | .poll = video_poll, | 1430 | .poll = video_poll, |
1431 | .mmap = video_mmap, | 1431 | .mmap = video_mmap, |
1432 | .ioctl = video_ioctl2, | 1432 | .ioctl = video_ioctl2, |
1433 | .compat_ioctl = v4l_compat_ioctl32, | ||
1434 | .llseek = no_llseek, | ||
1435 | }; | 1433 | }; |
1436 | 1434 | ||
1437 | static const struct v4l2_ioctl_ops video_ioctl_ops = { | 1435 | static const struct v4l2_ioctl_ops video_ioctl_ops = { |
@@ -1479,13 +1477,11 @@ static struct video_device cx23885_video_template = { | |||
1479 | .current_norm = V4L2_STD_NTSC_M, | 1477 | .current_norm = V4L2_STD_NTSC_M, |
1480 | }; | 1478 | }; |
1481 | 1479 | ||
1482 | static const struct file_operations radio_fops = { | 1480 | static const struct v4l2_file_operations radio_fops = { |
1483 | .owner = THIS_MODULE, | 1481 | .owner = THIS_MODULE, |
1484 | .open = video_open, | 1482 | .open = video_open, |
1485 | .release = video_release, | 1483 | .release = video_release, |
1486 | .ioctl = video_ioctl2, | 1484 | .ioctl = video_ioctl2, |
1487 | .compat_ioctl = v4l_compat_ioctl32, | ||
1488 | .llseek = no_llseek, | ||
1489 | }; | 1485 | }; |
1490 | 1486 | ||
1491 | 1487 | ||