diff options
Diffstat (limited to 'include/media/v4l2-ioctl.h')
-rw-r--r-- | include/media/v4l2-ioctl.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h index 0bef03add796..e6ba25b3d7c8 100644 --- a/include/media/v4l2-ioctl.h +++ b/include/media/v4l2-ioctl.h | |||
@@ -271,26 +271,38 @@ extern const char *v4l2_field_names[]; | |||
271 | extern const char *v4l2_type_names[]; | 271 | extern const char *v4l2_type_names[]; |
272 | 272 | ||
273 | /* Compatibility layer interface -- v4l1-compat module */ | 273 | /* Compatibility layer interface -- v4l1-compat module */ |
274 | typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, | 274 | typedef int (*v4l2_kioctl)(struct file *file, |
275 | unsigned int cmd, void *arg); | 275 | unsigned int cmd, void *arg); |
276 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | 276 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
277 | int v4l_compat_translate_ioctl(struct inode *inode, struct file *file, | 277 | int v4l_compat_translate_ioctl(struct file *file, |
278 | int cmd, void *arg, v4l2_kioctl driver_ioctl); | 278 | int cmd, void *arg, v4l2_kioctl driver_ioctl); |
279 | #else | 279 | #else |
280 | #define v4l_compat_translate_ioctl(inode, file, cmd, arg, ioctl) (-EINVAL) | 280 | #define v4l_compat_translate_ioctl(file, cmd, arg, ioctl) (-EINVAL) |
281 | #endif | 281 | #endif |
282 | 282 | ||
283 | /* 32 Bits compatibility layer for 64 bits processors */ | 283 | /* 32 Bits compatibility layer for 64 bits processors */ |
284 | extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, | 284 | extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, |
285 | unsigned long arg); | 285 | unsigned long arg); |
286 | 286 | ||
287 | extern int video_ioctl2(struct inode *inode, struct file *file, | ||
288 | unsigned int cmd, unsigned long arg); | ||
289 | |||
290 | /* Include support for obsoleted stuff */ | 287 | /* Include support for obsoleted stuff */ |
291 | extern int video_usercopy(struct inode *inode, struct file *file, | 288 | extern int video_usercopy(struct inode *inode, struct file *file, |
292 | unsigned int cmd, unsigned long arg, | 289 | unsigned int cmd, unsigned long arg, |
293 | int (*func)(struct inode *inode, struct file *file, | 290 | int (*func)(struct inode *inode, struct file *file, |
294 | unsigned int cmd, void *arg)); | 291 | unsigned int cmd, void *arg)); |
295 | 292 | ||
293 | /* Standard handlers for V4L ioctl's */ | ||
294 | |||
295 | /* This prototype is used on fops.unlocked_ioctl */ | ||
296 | extern int __video_ioctl2(struct file *file, | ||
297 | unsigned int cmd, unsigned long arg); | ||
298 | |||
299 | /* This prototype is used on fops.ioctl | ||
300 | * Since fops.ioctl enables Kernel Big Lock, it is preferred | ||
301 | * to use __video_ioctl2 instead. | ||
302 | * It should be noticed that there's no lock code inside | ||
303 | * video_ioctl2(). | ||
304 | */ | ||
305 | extern int video_ioctl2(struct inode *inode, struct file *file, | ||
306 | unsigned int cmd, unsigned long arg); | ||
307 | |||
296 | #endif /* _V4L2_IOCTL_H */ | 308 | #endif /* _V4L2_IOCTL_H */ |