diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-06 09:26:37 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-06 09:26:37 -0300 |
commit | bae6d2d03bd97c9a01a7a2340ac317ab16db318b (patch) | |
tree | 1151759479751413bcc3808cad78673bfed9e4b4 /linux/include | |
parent | a4cb33cff17f5f298a06624552fa3fb401d3c749 (diff) | |
download | mediapointer-dvb-s2-bae6d2d03bd97c9a01a7a2340ac317ab16db318b.tar.gz mediapointer-dvb-s2-bae6d2d03bd97c9a01a7a2340ac317ab16db318b.tar.bz2 |
Fixes an issue with V4L1 and make headers-install
From: Mauro Carvalho Chehab <mchehab@infradead.org>
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 'linux/include')
-rw-r--r-- | linux/include/linux/videodev.h | 3 | ||||
-rw-r--r-- | linux/include/linux/videodev2.h | 2 | ||||
-rw-r--r-- | linux/include/media/v4l2-dev.h | 6 |
3 files changed, 4 insertions, 7 deletions
diff --git a/linux/include/linux/videodev.h b/linux/include/linux/videodev.h index 518c7a321..8dba97a29 100644 --- a/linux/include/linux/videodev.h +++ b/linux/include/linux/videodev.h @@ -14,8 +14,7 @@ #include <linux/videodev2.h> -#ifdef CONFIG_VIDEO_V4L1_COMPAT -#define HAVE_V4L1 1 +#if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__) struct video_capability { diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h index 906761fe2..c269a76ca 100644 --- a/linux/include/linux/videodev2.h +++ b/linux/include/linux/videodev2.h @@ -22,8 +22,6 @@ #endif #include <linux/types.h> -#define HAVE_V4L2 1 - /* * Common stuff for both V4L1 and V4L2 * Moved from videodev.h diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h index 2a55cd41c..739800642 100644 --- a/linux/include/media/v4l2-dev.h +++ b/linux/include/media/v4l2-dev.h @@ -205,7 +205,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 @@ -362,7 +362,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> #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) @@ -384,7 +384,7 @@ video_device_remove_file(struct video_device *vfd, } #endif -#endif /* HAVE_V4L1 */ +#endif /* CONFIG_VIDEO_V4L1_COMPAT */ #ifdef OBSOLETE_OWNER /* to be removed soon */ /* helper functions to access driver private data. */ |