aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/sn9c102
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-12-30 04:58:20 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-01-02 14:11:12 -0500
commitbec43661b1dc0075b7445223ba775674133b164d (patch)
tree2a09ad5cc78799985e5cfb789f0a23db58e70499 /drivers/media/video/sn9c102
parentdfa9a5ae679ff2d23caa995d0f55a19abaf0596e (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/sn9c102')
-rw-r--r--drivers/media/video/sn9c102/sn9c102_core.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/video/sn9c102/sn9c102_core.c
index 01a8efb8deb1..c2582e248fa3 100644
--- a/drivers/media/video/sn9c102/sn9c102_core.c
+++ b/drivers/media/video/sn9c102/sn9c102_core.c
@@ -1746,7 +1746,7 @@ static void sn9c102_release_resources(struct kref *kref)
1746} 1746}
1747 1747
1748 1748
1749static int sn9c102_open(struct inode* inode, struct file* filp) 1749static int sn9c102_open(struct file *filp)
1750{ 1750{
1751 struct sn9c102_device* cam; 1751 struct sn9c102_device* cam;
1752 int err = 0; 1752 int err = 0;
@@ -1857,7 +1857,7 @@ out:
1857} 1857}
1858 1858
1859 1859
1860static int sn9c102_release(struct inode* inode, struct file* filp) 1860static int sn9c102_release(struct file *filp)
1861{ 1861{
1862 struct sn9c102_device* cam; 1862 struct sn9c102_device* cam;
1863 1863
@@ -3092,8 +3092,8 @@ sn9c102_vidioc_s_audio(struct sn9c102_device* cam, void __user * arg)
3092} 3092}
3093 3093
3094 3094
3095static int sn9c102_ioctl_v4l2(struct inode* inode, struct file* filp, 3095static int sn9c102_ioctl_v4l2(struct file *filp,
3096 unsigned int cmd, void __user * arg) 3096 unsigned int cmd, void __user *arg)
3097{ 3097{
3098 struct sn9c102_device *cam = video_drvdata(filp); 3098 struct sn9c102_device *cam = video_drvdata(filp);
3099 3099
@@ -3196,7 +3196,7 @@ static int sn9c102_ioctl_v4l2(struct inode* inode, struct file* filp,
3196} 3196}
3197 3197
3198 3198
3199static int sn9c102_ioctl(struct inode* inode, struct file* filp, 3199static int sn9c102_ioctl(struct file *filp,
3200 unsigned int cmd, unsigned long arg) 3200 unsigned int cmd, unsigned long arg)
3201{ 3201{
3202 struct sn9c102_device *cam = video_drvdata(filp); 3202 struct sn9c102_device *cam = video_drvdata(filp);
@@ -3220,7 +3220,7 @@ static int sn9c102_ioctl(struct inode* inode, struct file* filp,
3220 3220
3221 V4LDBG(3, "sn9c102", cmd); 3221 V4LDBG(3, "sn9c102", cmd);
3222 3222
3223 err = sn9c102_ioctl_v4l2(inode, filp, cmd, (void __user *)arg); 3223 err = sn9c102_ioctl_v4l2(filp, cmd, (void __user *)arg);
3224 3224
3225 mutex_unlock(&cam->fileop_mutex); 3225 mutex_unlock(&cam->fileop_mutex);
3226 3226
@@ -3229,18 +3229,14 @@ static int sn9c102_ioctl(struct inode* inode, struct file* filp,
3229 3229
3230/*****************************************************************************/ 3230/*****************************************************************************/
3231 3231
3232static const struct file_operations sn9c102_fops = { 3232static const struct v4l2_file_operations sn9c102_fops = {
3233 .owner = THIS_MODULE, 3233 .owner = THIS_MODULE,
3234 .open = sn9c102_open, 3234 .open = sn9c102_open,
3235 .release = sn9c102_release, 3235 .release = sn9c102_release,
3236 .ioctl = sn9c102_ioctl, 3236 .ioctl = sn9c102_ioctl,
3237#ifdef CONFIG_COMPAT
3238 .compat_ioctl = v4l_compat_ioctl32,
3239#endif
3240 .read = sn9c102_read, 3237 .read = sn9c102_read,
3241 .poll = sn9c102_poll, 3238 .poll = sn9c102_poll,
3242 .mmap = sn9c102_mmap, 3239 .mmap = sn9c102_mmap,
3243 .llseek = no_llseek,
3244}; 3240};
3245 3241
3246/*****************************************************************************/ 3242/*****************************************************************************/