diff options
Diffstat (limited to 'include/media/v4l2-ioctl.h')
| -rw-r--r-- | include/media/v4l2-ioctl.h | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h index fcdb58c4ce07..b01c044868d0 100644 --- a/include/media/v4l2-ioctl.h +++ b/include/media/v4l2-ioctl.h | |||
| @@ -225,12 +225,12 @@ struct v4l2_ioctl_ops { | |||
| 225 | /* Debugging ioctls */ | 225 | /* Debugging ioctls */ |
| 226 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 226 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
| 227 | int (*vidioc_g_register) (struct file *file, void *fh, | 227 | int (*vidioc_g_register) (struct file *file, void *fh, |
| 228 | struct v4l2_register *reg); | 228 | struct v4l2_dbg_register *reg); |
| 229 | int (*vidioc_s_register) (struct file *file, void *fh, | 229 | int (*vidioc_s_register) (struct file *file, void *fh, |
| 230 | struct v4l2_register *reg); | 230 | struct v4l2_dbg_register *reg); |
| 231 | #endif | 231 | #endif |
| 232 | int (*vidioc_g_chip_ident) (struct file *file, void *fh, | 232 | int (*vidioc_g_chip_ident) (struct file *file, void *fh, |
| 233 | struct v4l2_chip_ident *chip); | 233 | struct v4l2_dbg_chip_ident *chip); |
| 234 | 234 | ||
| 235 | int (*vidioc_enum_framesizes) (struct file *file, void *fh, | 235 | int (*vidioc_enum_framesizes) (struct file *file, void *fh, |
| 236 | struct v4l2_frmsizeenum *fsize); | 236 | struct v4l2_frmsizeenum *fsize); |
| @@ -239,7 +239,7 @@ struct v4l2_ioctl_ops { | |||
| 239 | struct v4l2_frmivalenum *fival); | 239 | struct v4l2_frmivalenum *fival); |
| 240 | 240 | ||
| 241 | /* For other private ioctls */ | 241 | /* For other private ioctls */ |
| 242 | int (*vidioc_default) (struct file *file, void *fh, | 242 | long (*vidioc_default) (struct file *file, void *fh, |
| 243 | int cmd, void *arg); | 243 | int cmd, void *arg); |
| 244 | }; | 244 | }; |
| 245 | 245 | ||
| @@ -277,36 +277,27 @@ extern const char *v4l2_field_names[]; | |||
| 277 | extern const char *v4l2_type_names[]; | 277 | extern const char *v4l2_type_names[]; |
| 278 | 278 | ||
| 279 | /* Compatibility layer interface -- v4l1-compat module */ | 279 | /* Compatibility layer interface -- v4l1-compat module */ |
| 280 | typedef int (*v4l2_kioctl)(struct file *file, | 280 | typedef long (*v4l2_kioctl)(struct file *file, |
| 281 | unsigned int cmd, void *arg); | 281 | unsigned int cmd, void *arg); |
| 282 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | 282 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
| 283 | int v4l_compat_translate_ioctl(struct file *file, | 283 | long v4l_compat_translate_ioctl(struct file *file, |
| 284 | int cmd, void *arg, v4l2_kioctl driver_ioctl); | 284 | int cmd, void *arg, v4l2_kioctl driver_ioctl); |
| 285 | #else | 285 | #else |
| 286 | #define v4l_compat_translate_ioctl(file, cmd, arg, ioctl) (-EINVAL) | 286 | #define v4l_compat_translate_ioctl(file, cmd, arg, ioctl) (-EINVAL) |
| 287 | #endif | 287 | #endif |
| 288 | 288 | ||
| 289 | #ifdef CONFIG_COMPAT | ||
| 289 | /* 32 Bits compatibility layer for 64 bits processors */ | 290 | /* 32 Bits compatibility layer for 64 bits processors */ |
| 290 | extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, | 291 | extern long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, |
| 291 | unsigned long arg); | 292 | unsigned long arg); |
| 293 | #endif | ||
| 292 | 294 | ||
| 293 | /* Include support for obsoleted stuff */ | 295 | /* Include support for obsoleted stuff */ |
| 294 | extern int video_usercopy(struct file *file, unsigned int cmd, | 296 | extern long video_usercopy(struct file *file, unsigned int cmd, |
| 295 | unsigned long arg, v4l2_kioctl func); | 297 | unsigned long arg, v4l2_kioctl func); |
| 296 | 298 | ||
| 297 | /* Standard handlers for V4L ioctl's */ | 299 | /* Standard handlers for V4L ioctl's */ |
| 298 | 300 | extern long video_ioctl2(struct file *file, | |
| 299 | /* This prototype is used on fops.unlocked_ioctl */ | ||
| 300 | extern long __video_ioctl2(struct file *file, | ||
| 301 | unsigned int cmd, unsigned long arg); | ||
| 302 | |||
| 303 | /* This prototype is used on fops.ioctl | ||
| 304 | * Since fops.ioctl enables Kernel Big Lock, it is preferred | ||
| 305 | * to use __video_ioctl2 instead. | ||
| 306 | * It should be noticed that there's no lock code inside | ||
| 307 | * video_ioctl2(). | ||
| 308 | */ | ||
| 309 | extern int video_ioctl2(struct inode *inode, struct file *file, | ||
| 310 | unsigned int cmd, unsigned long arg); | 301 | unsigned int cmd, unsigned long arg); |
| 311 | 302 | ||
| 312 | #endif /* _V4L2_IOCTL_H */ | 303 | #endif /* _V4L2_IOCTL_H */ |
