diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-12-30 04:58:20 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-01-02 14:11:12 -0500 |
commit | bec43661b1dc0075b7445223ba775674133b164d (patch) | |
tree | 2a09ad5cc78799985e5cfb789f0a23db58e70499 /drivers/media/video/s2255drv.c | |
parent | dfa9a5ae679ff2d23caa995d0f55a19abaf0596e (diff) |
V4L/DVB (10135): v4l2: introduce v4l2_file_operations.
Introduce a struct v4l2_file_operations for v4l2 drivers.
Remove the unnecessary inode argument.
Move compat32 handling (and llseek) into the v4l2-dev core: this is now
handled in the v4l2 core and no longer in the drivers themselves.
Note that this changeset reverts an earlier patch that changed the return
type of__video_ioctl2 from int to long. This change will be reinstated
later in a much improved version.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
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 = { |