diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-12-30 10:58:20 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2008-12-30 10:58:20 +0100 |
commit | c91fcc9b460397a85a6bd1d8f441d8da5abac415 (patch) | |
tree | af3440ea722abf6142021621c29745328af7ac2a /linux/drivers/media/video/s2255drv.c | |
parent | d1e126d1421066319ebc9da9c8084c425cfdc762 (diff) | |
download | mediapointer-dvb-s2-c91fcc9b460397a85a6bd1d8f441d8da5abac415.tar.gz mediapointer-dvb-s2-c91fcc9b460397a85a6bd1d8f441d8da5abac415.tar.bz2 |
v4l2: introduce v4l2_file_operations.
From: Hans Verkuil <hverkuil@xs4all.nl>
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.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/s2255drv.c')
-rw-r--r-- | linux/drivers/media/video/s2255drv.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/linux/drivers/media/video/s2255drv.c b/linux/drivers/media/video/s2255drv.c index ab9814144..2a2cbb418 100644 --- a/linux/drivers/media/video/s2255drv.c +++ b/linux/drivers/media/video/s2255drv.c @@ -1503,9 +1503,9 @@ static int vidioc_s_jpegcomp(struct file *file, void *priv, dprintk(2, "setting jpeg quality %d\n", jc->quality); return 0; } -static int s2255_open(struct inode *inode, struct file *file) +static int s2255_open(struct file *file) { - int minor = iminor(inode); + int minor = video_devdata(file)->minor; struct s2255_dev *h, *dev = NULL; struct s2255_fh *fh; struct list_head *list; @@ -1712,11 +1712,11 @@ static void s2255_destroy(struct kref *kref) mutex_unlock(&dev->open_lock); } -static int s2255_close(struct inode *inode, struct file *file) +static int s2255_close(struct file *file) { struct s2255_fh *fh = file->private_data; struct s2255_dev *dev = fh->dev; - int minor = iminor(inode); + int minor = video_devdata(file)->minor; if (!dev) return -ENODEV; @@ -1760,15 +1760,13 @@ static int s2255_mmap_v4l(struct file *file, struct vm_area_struct *vma) return ret; } -static const struct file_operations s2255_fops_v4l = { +static const struct v4l2_file_operations s2255_fops_v4l = { .owner = THIS_MODULE, .open = s2255_open, .release = s2255_close, .poll = s2255_poll, .ioctl = video_ioctl2, /* V4L2 ioctl handler */ - .compat_ioctl = v4l_compat_ioctl32, .mmap = s2255_mmap_v4l, - .llseek = no_llseek, }; static const struct v4l2_ioctl_ops s2255_ioctl_ops = { |