X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fvideodev.h;fp=include%2Flinux%2Fvideodev.h;h=91140091ced2f2b510a3ac2bf05d79d738078f0e;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=8dba97a291f67dda20e69bd7d35f11a43881587b;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 8dba97a29..91140091c 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h @@ -1,20 +1,48 @@ -/* - * Video for Linux version 1 - OBSOLETE - * - * Header file for v4l1 drivers and applications, for - * Linux kernels 2.2.x or 2.4.x. - * - * Provides header for legacy drivers and applications - * - * See http://linuxtv.org for more info - * - */ #ifndef __LINUX_VIDEODEV_H #define __LINUX_VIDEODEV_H +#include + +#define HAVE_V4L1 1 + #include -#if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__) +#ifdef __KERNEL__ + +#include + +extern struct video_device* video_devdata(struct file*); + +#define to_video_device(cd) container_of(cd, struct video_device, class_dev) +static inline void +video_device_create_file(struct video_device *vfd, + struct class_device_attribute *attr) +{ + class_device_create_file(&vfd->class_dev, attr); +} +static inline void +video_device_remove_file(struct video_device *vfd, + struct class_device_attribute *attr) +{ + class_device_remove_file(&vfd->class_dev, attr); +} + +#if OBSOLETE_OWNER /* to be removed in 2.6.15 */ +/* helper functions to access driver private data. */ +static inline void *video_get_drvdata(struct video_device *dev) +{ + return dev->priv; +} + +static inline void video_set_drvdata(struct video_device *dev, void *data) +{ + dev->priv = data; +} +#endif + +extern int video_exclusive_open(struct inode *inode, struct file *file); +extern int video_exclusive_release(struct inode *inode, struct file *file); +#endif /* __KERNEL__ */ struct video_capability { @@ -335,9 +363,6 @@ struct video_code #define VID_HARDWARE_SAA7114H 37 #define VID_HARDWARE_SN9C102 38 #define VID_HARDWARE_ARV 39 - -#endif /* CONFIG_VIDEO_V4L1_COMPAT */ - #endif /* __LINUX_VIDEODEV_H */ /*