summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-09-10 12:01:19 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-10 13:45:55 -0300
commit8a905162e038367503bac732bf1e3e01c19158b9 (patch)
treebf72a91df67baf47560812ceb756d1a19eb289c7 /include/media
parentc663155c3db58d1fff43a105eb5a0e9147ec2a6b (diff)
downloadlinux-8a905162e038367503bac732bf1e3e01c19158b9.tar.bz2
V4L/DVB (4605): Fixes an issue with V4L1 and make headers-install
V4L1 support should be disabled when no CONFIG_VIDEO_V4L1_COMPAT is defined, to allow checking for broken V4L2 ports. This is very important during the migration phase for V4L2 API. However, userspace apps should be capable of using both APIs, since they need to test at runtime, via VIDIOCGCAP ioctl, if V4L1 is supported. So, when __KERNEL__ is not defined, those ioctls and corresponding structs should be visible. This patch also removes the obsolete defines HAVE_V4L1 and HAVE_V4L2, that where causing some confusion, and were replaced by CONFIG_VIDEO_V4L1_COMPAT and CONFIG_VIDEO_V4L2. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/v4l2-dev.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index 600d61d7d2ab..810462f8a374 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -194,7 +194,7 @@ struct video_device
int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i);
-#ifdef HAVE_V4L1
+#ifdef CONFIG_VIDEO_V4L1_COMPAT
/* buffer type is struct vidio_mbuf * */
int (*vidiocgmbuf) (struct file *file, void *fh, struct video_mbuf *p);
#endif
@@ -335,7 +335,7 @@ extern int video_usercopy(struct inode *inode, struct file *file,
unsigned int cmd, void *arg));
-#ifdef HAVE_V4L1
+#ifdef CONFIG_VIDEO_V4L1_COMPAT
#include <linux/mm.h>
extern struct video_device* video_devdata(struct file*);
@@ -357,6 +357,8 @@ video_device_remove_file(struct video_device *vfd,
class_device_remove_file(&vfd->class_dev, attr);
}
+#endif /* CONFIG_VIDEO_V4L1_COMPAT */
+
#ifdef OBSOLETE_OWNER /* to be removed soon */
/* helper functions to access driver private data. */
static inline void *video_get_drvdata(struct video_device *dev)
@@ -372,6 +374,5 @@ static inline void video_set_drvdata(struct video_device *dev, void *data)
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 /* _V4L2_DEV_H */