summaryrefslogtreecommitdiff
path: root/linux/include/media/v4l2-dev.h
diff options
context:
space:
mode:
Diffstat (limited to 'linux/include/media/v4l2-dev.h')
-rw-r--r--linux/include/media/v4l2-dev.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h
index 39f4b7c69..2a55cd41c 100644
--- a/linux/include/media/v4l2-dev.h
+++ b/linux/include/media/v4l2-dev.h
@@ -9,13 +9,11 @@
#ifndef _V4L2_DEV_H
#define _V4L2_DEV_H
-#define OBSOLETE_OWNER 1 /* to be removed soon */
+#define OBSOLETE_OWNER 1 /* to be removed soon */
+#define OBSOLETE_DEVDATA 1 /* to be removed soon */
#include <linux/poll.h>
#include <linux/fs.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69)
-#include <linux/devfs_fs_kernel.h>
-#endif
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
#include <linux/device.h>
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
@@ -23,7 +21,7 @@
#endif
#endif
#include <linux/compiler.h> /* need __user */
-#ifdef CONFIG_VIDEO_V4L1
+#ifdef CONFIG_VIDEO_V4L1_COMPAT
#include <linux/videodev.h>
#else
#include <linux/videodev2.h>
@@ -341,11 +339,6 @@ void *priv;
#else
struct semaphore lock; /* ... helper function uses these */
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69)
- devfs_handle_t devfs_handle; /* devfs */
-#else
- char devfs_name[64]; /* devfs */
-#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
struct class_device class_dev; /* sysfs */
#endif
@@ -372,15 +365,16 @@ extern int video_usercopy(struct inode *inode, struct file *file,
#ifdef HAVE_V4L1
#include <linux/mm.h>
-extern struct video_device* video_devdata(struct file*);
-
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
#define to_video_device(cd) container_of(cd, struct video_device, class_dev)
-static inline void
+static inline int
video_device_create_file(struct video_device *vfd,
struct class_device_attribute *attr)
{
- class_device_create_file(&vfd->class_dev, attr);
+ int ret = class_device_create_file(&vfd->class_dev, attr);
+ if (ret < 0)
+ printk(KERN_WARNING "%s error: %d\n", __FUNCTION__, ret);
+ return ret;
}
static inline void
video_device_remove_file(struct video_device *vfd,
@@ -390,6 +384,8 @@ video_device_remove_file(struct video_device *vfd,
}
#endif
+#endif /* HAVE_V4L1 */
+
#ifdef OBSOLETE_OWNER /* to be removed soon */
/* helper functions to access driver private data. */
static inline void *video_get_drvdata(struct video_device *dev)
@@ -401,10 +397,14 @@ static inline void video_set_drvdata(struct video_device *dev, void *data)
{
dev->priv = data;
}
+
#endif
+#ifdef OBSOLETE_DEVDATA /* to be removed soon */
+/* Obsolete stuff - Still needed for radio devices and obsolete drivers */
+extern struct video_device* video_devdata(struct file*);
extern int video_exclusive_open(struct inode *inode, struct file *file);
extern int video_exclusive_release(struct inode *inode, struct file *file);
-#endif /* HAVE_V4L1 */
+#endif
#endif /* _V4L2_DEV_H */