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/stradis.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/stradis.c')
-rw-r--r-- | drivers/media/video/stradis.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/stradis.c b/drivers/media/video/stradis.c index bbad54f85c83..10d2608501ae 100644 --- a/drivers/media/video/stradis.c +++ b/drivers/media/video/stradis.c | |||
@@ -1275,7 +1275,7 @@ static void make_clip_tab(struct saa7146 *saa, struct video_clip *cr, int ncr) | |||
1275 | clip_draw_rectangle(clipmap, 0, 0, 1024, -saa->win.y); | 1275 | clip_draw_rectangle(clipmap, 0, 0, 1024, -saa->win.y); |
1276 | } | 1276 | } |
1277 | 1277 | ||
1278 | static int saa_ioctl(struct inode *inode, struct file *file, | 1278 | static int saa_ioctl(struct file *file, |
1279 | unsigned int cmd, unsigned long argl) | 1279 | unsigned int cmd, unsigned long argl) |
1280 | { | 1280 | { |
1281 | struct saa7146 *saa = file->private_data; | 1281 | struct saa7146 *saa = file->private_data; |
@@ -1877,7 +1877,7 @@ static ssize_t saa_write(struct file *file, const char __user * buf, | |||
1877 | return count; | 1877 | return count; |
1878 | } | 1878 | } |
1879 | 1879 | ||
1880 | static int saa_open(struct inode *inode, struct file *file) | 1880 | static int saa_open(struct file *file) |
1881 | { | 1881 | { |
1882 | struct video_device *vdev = video_devdata(file); | 1882 | struct video_device *vdev = video_devdata(file); |
1883 | struct saa7146 *saa = container_of(vdev, struct saa7146, video_dev); | 1883 | struct saa7146 *saa = container_of(vdev, struct saa7146, video_dev); |
@@ -1895,7 +1895,7 @@ static int saa_open(struct inode *inode, struct file *file) | |||
1895 | return 0; | 1895 | return 0; |
1896 | } | 1896 | } |
1897 | 1897 | ||
1898 | static int saa_release(struct inode *inode, struct file *file) | 1898 | static int saa_release(struct file *file) |
1899 | { | 1899 | { |
1900 | struct saa7146 *saa = file->private_data; | 1900 | struct saa7146 *saa = file->private_data; |
1901 | saa->user--; | 1901 | saa->user--; |
@@ -1906,16 +1906,12 @@ static int saa_release(struct inode *inode, struct file *file) | |||
1906 | return 0; | 1906 | return 0; |
1907 | } | 1907 | } |
1908 | 1908 | ||
1909 | static const struct file_operations saa_fops = { | 1909 | static const struct v4l2_file_operations saa_fops = { |
1910 | .owner = THIS_MODULE, | 1910 | .owner = THIS_MODULE, |
1911 | .open = saa_open, | 1911 | .open = saa_open, |
1912 | .release = saa_release, | 1912 | .release = saa_release, |
1913 | .ioctl = saa_ioctl, | 1913 | .ioctl = saa_ioctl, |
1914 | #ifdef CONFIG_COMPAT | ||
1915 | .compat_ioctl = v4l_compat_ioctl32, | ||
1916 | #endif | ||
1917 | .read = saa_read, | 1914 | .read = saa_read, |
1918 | .llseek = no_llseek, | ||
1919 | .write = saa_write, | 1915 | .write = saa_write, |
1920 | .mmap = saa_mmap, | 1916 | .mmap = saa_mmap, |
1921 | }; | 1917 | }; |