aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-09-10 11:01:19 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-10 12:45:55 -0400
commit8a905162e038367503bac732bf1e3e01c19158b9 (patch)
treebf72a91df67baf47560812ceb756d1a19eb289c7 /include
parentc663155c3db58d1fff43a105eb5a0e9147ec2a6b (diff)
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')
-rw-r--r--include/linux/videodev.h3
-rw-r--r--include/linux/videodev2.h2
-rw-r--r--include/media/v4l2-dev.h7
3 files changed, 5 insertions, 7 deletions
diff --git a/include/linux/videodev.h b/include/linux/videodev.h
index 518c7a32175e..8dba97a291f6 100644
--- a/include/linux/videodev.h
+++ b/include/linux/videodev.h
@@ -14,8 +14,7 @@
14 14
15#include <linux/videodev2.h> 15#include <linux/videodev2.h>
16 16
17#ifdef CONFIG_VIDEO_V4L1_COMPAT 17#if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__)
18#define HAVE_V4L1 1
19 18
20struct video_capability 19struct video_capability
21{ 20{
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index b7146956a929..e3715d774197 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -22,8 +22,6 @@
22#endif 22#endif
23#include <linux/types.h> 23#include <linux/types.h>
24 24
25#define HAVE_V4L2 1
26
27/* 25/*
28 * Common stuff for both V4L1 and V4L2 26 * Common stuff for both V4L1 and V4L2
29 * Moved from videodev.h 27 * Moved from videodev.h
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
194 194
195 195
196 int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i); 196 int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i);
197#ifdef HAVE_V4L1 197#ifdef CONFIG_VIDEO_V4L1_COMPAT
198 /* buffer type is struct vidio_mbuf * */ 198 /* buffer type is struct vidio_mbuf * */
199 int (*vidiocgmbuf) (struct file *file, void *fh, struct video_mbuf *p); 199 int (*vidiocgmbuf) (struct file *file, void *fh, struct video_mbuf *p);
200#endif 200#endif
@@ -335,7 +335,7 @@ extern int video_usercopy(struct inode *inode, struct file *file,
335 unsigned int cmd, void *arg)); 335 unsigned int cmd, void *arg));
336 336
337 337
338#ifdef HAVE_V4L1 338#ifdef CONFIG_VIDEO_V4L1_COMPAT
339#include <linux/mm.h> 339#include <linux/mm.h>
340 340
341extern struct video_device* video_devdata(struct file*); 341extern struct video_device* video_devdata(struct file*);
@@ -357,6 +357,8 @@ video_device_remove_file(struct video_device *vfd,
357 class_device_remove_file(&vfd->class_dev, attr); 357 class_device_remove_file(&vfd->class_dev, attr);
358} 358}
359 359
360#endif /* CONFIG_VIDEO_V4L1_COMPAT */
361
360#ifdef OBSOLETE_OWNER /* to be removed soon */ 362#ifdef OBSOLETE_OWNER /* to be removed soon */
361/* helper functions to access driver private data. */ 363/* helper functions to access driver private data. */
362static inline void *video_get_drvdata(struct video_device *dev) 364static 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)
372 374
373extern int video_exclusive_open(struct inode *inode, struct file *file); 375extern int video_exclusive_open(struct inode *inode, struct file *file);
374extern int video_exclusive_release(struct inode *inode, struct file *file); 376extern int video_exclusive_release(struct inode *inode, struct file *file);
375#endif /* HAVE_V4L1 */
376 377
377#endif /* _V4L2_DEV_H */ 378#endif /* _V4L2_DEV_H */