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/et61x251 | |
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/et61x251')
-rw-r--r-- | drivers/media/video/et61x251/et61x251_core.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/media/video/et61x251/et61x251_core.c b/drivers/media/video/et61x251/et61x251_core.c index 83c07112c59d..3aeb8791a5bd 100644 --- a/drivers/media/video/et61x251/et61x251_core.c +++ b/drivers/media/video/et61x251/et61x251_core.c | |||
@@ -1206,7 +1206,7 @@ static void et61x251_release_resources(struct kref *kref) | |||
1206 | } | 1206 | } |
1207 | 1207 | ||
1208 | 1208 | ||
1209 | static int et61x251_open(struct inode* inode, struct file* filp) | 1209 | static int et61x251_open(struct file *filp) |
1210 | { | 1210 | { |
1211 | struct et61x251_device* cam; | 1211 | struct et61x251_device* cam; |
1212 | int err = 0; | 1212 | int err = 0; |
@@ -1291,7 +1291,7 @@ out: | |||
1291 | } | 1291 | } |
1292 | 1292 | ||
1293 | 1293 | ||
1294 | static int et61x251_release(struct inode* inode, struct file* filp) | 1294 | static int et61x251_release(struct file *filp) |
1295 | { | 1295 | { |
1296 | struct et61x251_device* cam; | 1296 | struct et61x251_device* cam; |
1297 | 1297 | ||
@@ -2392,8 +2392,8 @@ et61x251_vidioc_s_parm(struct et61x251_device* cam, void __user * arg) | |||
2392 | } | 2392 | } |
2393 | 2393 | ||
2394 | 2394 | ||
2395 | static int et61x251_ioctl_v4l2(struct inode* inode, struct file* filp, | 2395 | static int et61x251_ioctl_v4l2(struct file *filp, |
2396 | unsigned int cmd, void __user * arg) | 2396 | unsigned int cmd, void __user *arg) |
2397 | { | 2397 | { |
2398 | struct et61x251_device *cam = video_drvdata(filp); | 2398 | struct et61x251_device *cam = video_drvdata(filp); |
2399 | 2399 | ||
@@ -2487,7 +2487,7 @@ static int et61x251_ioctl_v4l2(struct inode* inode, struct file* filp, | |||
2487 | } | 2487 | } |
2488 | 2488 | ||
2489 | 2489 | ||
2490 | static int et61x251_ioctl(struct inode* inode, struct file* filp, | 2490 | static int et61x251_ioctl(struct file *filp, |
2491 | unsigned int cmd, unsigned long arg) | 2491 | unsigned int cmd, unsigned long arg) |
2492 | { | 2492 | { |
2493 | struct et61x251_device *cam = video_drvdata(filp); | 2493 | struct et61x251_device *cam = video_drvdata(filp); |
@@ -2511,7 +2511,7 @@ static int et61x251_ioctl(struct inode* inode, struct file* filp, | |||
2511 | 2511 | ||
2512 | V4LDBG(3, "et61x251", cmd); | 2512 | V4LDBG(3, "et61x251", cmd); |
2513 | 2513 | ||
2514 | err = et61x251_ioctl_v4l2(inode, filp, cmd, (void __user *)arg); | 2514 | err = et61x251_ioctl_v4l2(filp, cmd, (void __user *)arg); |
2515 | 2515 | ||
2516 | mutex_unlock(&cam->fileop_mutex); | 2516 | mutex_unlock(&cam->fileop_mutex); |
2517 | 2517 | ||
@@ -2519,18 +2519,14 @@ static int et61x251_ioctl(struct inode* inode, struct file* filp, | |||
2519 | } | 2519 | } |
2520 | 2520 | ||
2521 | 2521 | ||
2522 | static const struct file_operations et61x251_fops = { | 2522 | static const struct v4l2_file_operations et61x251_fops = { |
2523 | .owner = THIS_MODULE, | 2523 | .owner = THIS_MODULE, |
2524 | .open = et61x251_open, | 2524 | .open = et61x251_open, |
2525 | .release = et61x251_release, | 2525 | .release = et61x251_release, |
2526 | .ioctl = et61x251_ioctl, | 2526 | .ioctl = et61x251_ioctl, |
2527 | #ifdef CONFIG_COMPAT | ||
2528 | .compat_ioctl = v4l_compat_ioctl32, | ||
2529 | #endif | ||
2530 | .read = et61x251_read, | 2527 | .read = et61x251_read, |
2531 | .poll = et61x251_poll, | 2528 | .poll = et61x251_poll, |
2532 | .mmap = et61x251_mmap, | 2529 | .mmap = et61x251_mmap, |
2533 | .llseek = no_llseek, | ||
2534 | }; | 2530 | }; |
2535 | 2531 | ||
2536 | /*****************************************************************************/ | 2532 | /*****************************************************************************/ |