diff options
Diffstat (limited to 'drivers/media/video/s2255drv.c')
| -rw-r--r-- | drivers/media/video/s2255drv.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c index 3c3f8cf73108..13f85ad363cd 100644 --- a/drivers/media/video/s2255drv.c +++ b/drivers/media/video/s2255drv.c | |||
| @@ -1502,9 +1502,9 @@ static int vidioc_s_jpegcomp(struct file *file, void *priv, | |||
| 1502 | dprintk(2, "setting jpeg quality %d\n", jc->quality); | 1502 | dprintk(2, "setting jpeg quality %d\n", jc->quality); |
| 1503 | return 0; | 1503 | return 0; |
| 1504 | } | 1504 | } |
| 1505 | static int s2255_open(struct inode *inode, struct file *file) | 1505 | static int s2255_open(struct file *file) |
| 1506 | { | 1506 | { |
| 1507 | int minor = iminor(inode); | 1507 | int minor = video_devdata(file)->minor; |
| 1508 | struct s2255_dev *h, *dev = NULL; | 1508 | struct s2255_dev *h, *dev = NULL; |
| 1509 | struct s2255_fh *fh; | 1509 | struct s2255_fh *fh; |
| 1510 | struct list_head *list; | 1510 | struct list_head *list; |
| @@ -1711,11 +1711,11 @@ static void s2255_destroy(struct kref *kref) | |||
| 1711 | mutex_unlock(&dev->open_lock); | 1711 | mutex_unlock(&dev->open_lock); |
| 1712 | } | 1712 | } |
| 1713 | 1713 | ||
| 1714 | static int s2255_close(struct inode *inode, struct file *file) | 1714 | static int s2255_close(struct file *file) |
| 1715 | { | 1715 | { |
| 1716 | struct s2255_fh *fh = file->private_data; | 1716 | struct s2255_fh *fh = file->private_data; |
| 1717 | struct s2255_dev *dev = fh->dev; | 1717 | struct s2255_dev *dev = fh->dev; |
| 1718 | int minor = iminor(inode); | 1718 | int minor = video_devdata(file)->minor; |
| 1719 | if (!dev) | 1719 | if (!dev) |
| 1720 | return -ENODEV; | 1720 | return -ENODEV; |
| 1721 | 1721 | ||
| @@ -1759,15 +1759,13 @@ static int s2255_mmap_v4l(struct file *file, struct vm_area_struct *vma) | |||
| 1759 | return ret; | 1759 | return ret; |
| 1760 | } | 1760 | } |
| 1761 | 1761 | ||
| 1762 | static const struct file_operations s2255_fops_v4l = { | 1762 | static const struct v4l2_file_operations s2255_fops_v4l = { |
| 1763 | .owner = THIS_MODULE, | 1763 | .owner = THIS_MODULE, |
| 1764 | .open = s2255_open, | 1764 | .open = s2255_open, |
| 1765 | .release = s2255_close, | 1765 | .release = s2255_close, |
| 1766 | .poll = s2255_poll, | 1766 | .poll = s2255_poll, |
| 1767 | .ioctl = video_ioctl2, /* V4L2 ioctl handler */ | 1767 | .ioctl = video_ioctl2, /* V4L2 ioctl handler */ |
| 1768 | .compat_ioctl = v4l_compat_ioctl32, | ||
| 1769 | .mmap = s2255_mmap_v4l, | 1768 | .mmap = s2255_mmap_v4l, |
| 1770 | .llseek = no_llseek, | ||
| 1771 | }; | 1769 | }; |
| 1772 | 1770 | ||
| 1773 | static const struct v4l2_ioctl_ops s2255_ioctl_ops = { | 1771 | static const struct v4l2_ioctl_ops s2255_ioctl_ops = { |
