summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/Kconfig2
-rw-r--r--linux/drivers/media/video/zoran.h2
-rw-r--r--linux/drivers/media/video/zoran_driver.c22
-rw-r--r--linux/include/linux/videodev.h3
-rw-r--r--linux/include/linux/videodev2.h2
-rw-r--r--linux/include/media/v4l2-dev.h6
6 files changed, 17 insertions, 20 deletions
diff --git a/linux/drivers/media/Kconfig b/linux/drivers/media/Kconfig
index ef52e6da0..ed4aa4e79 100644
--- a/linux/drivers/media/Kconfig
+++ b/linux/drivers/media/Kconfig
@@ -53,7 +53,7 @@ config VIDEO_V4L1_COMPAT
If you are unsure as to whether this is required, answer Y.
config VIDEO_V4L2
- tristate
+ bool
default y
source "drivers/media/video/Kconfig"
diff --git a/linux/drivers/media/video/zoran.h b/linux/drivers/media/video/zoran.h
index 19c6e3aa0..7528ff967 100644
--- a/linux/drivers/media/video/zoran.h
+++ b/linux/drivers/media/video/zoran.h
@@ -267,7 +267,7 @@ struct zoran_v4l_settings {
};
/* whoops, this one is undeclared if !v4l2 */
-#ifndef HAVE_V4L2
+#ifndef CONFIG_VIDEO_V4L2
struct v4l2_jpegcompression {
int quality;
int APPn;
diff --git a/linux/drivers/media/video/zoran_driver.c b/linux/drivers/media/video/zoran_driver.c
index 7b7dc6ce9..e1e640c2c 100644
--- a/linux/drivers/media/video/zoran_driver.c
+++ b/linux/drivers/media/video/zoran_driver.c
@@ -89,7 +89,7 @@
#include "zoran_device.h"
#include "zoran_card.h"
-#ifdef HAVE_V4L2
+#ifdef CONFIG_VIDEO_V4L2
/* we declare some card type definitions here, they mean
* the same as the v4l1 ZORAN_VID_TYPE above, except it's v4l2 */
#define ZORAN_V4L2_VID_FLAGS ( \
@@ -106,7 +106,7 @@ const struct zoran_format zoran_formats[] = {
{
.name = "15-bit RGB",
.palette = VIDEO_PALETTE_RGB555,
-#ifdef HAVE_V4L2
+#ifdef CONFIG_VIDEO_V4L2
#ifdef __LITTLE_ENDIAN
.fourcc = V4L2_PIX_FMT_RGB555,
#else
@@ -120,7 +120,7 @@ const struct zoran_format zoran_formats[] = {
}, {
.name = "16-bit RGB",
.palette = VIDEO_PALETTE_RGB565,
-#ifdef HAVE_V4L2
+#ifdef CONFIG_VIDEO_V4L2
#ifdef __LITTLE_ENDIAN
.fourcc = V4L2_PIX_FMT_RGB565,
#else
@@ -134,7 +134,7 @@ const struct zoran_format zoran_formats[] = {
}, {
.name = "24-bit RGB",
.palette = VIDEO_PALETTE_RGB24,
-#ifdef HAVE_V4L2
+#ifdef CONFIG_VIDEO_V4L2
#ifdef __LITTLE_ENDIAN
.fourcc = V4L2_PIX_FMT_BGR24,
#else
@@ -148,7 +148,7 @@ const struct zoran_format zoran_formats[] = {
}, {
.name = "32-bit RGB",
.palette = VIDEO_PALETTE_RGB32,
-#ifdef HAVE_V4L2
+#ifdef CONFIG_VIDEO_V4L2
#ifdef __LITTLE_ENDIAN
.fourcc = V4L2_PIX_FMT_BGR32,
#else
@@ -162,7 +162,7 @@ const struct zoran_format zoran_formats[] = {
}, {
.name = "4:2:2, packed, YUYV",
.palette = VIDEO_PALETTE_YUV422,
-#ifdef HAVE_V4L2
+#ifdef CONFIG_VIDEO_V4L2
.fourcc = V4L2_PIX_FMT_YUYV,
.colorspace = V4L2_COLORSPACE_SMPTE170M,
#endif
@@ -172,7 +172,7 @@ const struct zoran_format zoran_formats[] = {
}, {
.name = "Hardware-encoded Motion-JPEG",
.palette = -1,
-#ifdef HAVE_V4L2
+#ifdef CONFIG_VIDEO_V4L2
.fourcc = V4L2_PIX_FMT_MJPEG,
.colorspace = V4L2_COLORSPACE_SMPTE170M,
#endif
@@ -213,7 +213,7 @@ static int lock_norm = 0; /* 1=Don't change TV standard (norm) */
module_param(lock_norm, int, 0);
MODULE_PARM_DESC(lock_norm, "Users can't change norm");
-#ifdef HAVE_V4L2
+#ifdef CONFIG_VIDEO_V4L2
/* small helper function for calculating buffersizes for v4l2
* we calculate the nearest higher power-of-two, which
* will be the recommended buffersize */
@@ -1764,7 +1764,7 @@ setup_overlay (struct file *file,
return wait_grab_pending(zr);
}
-#ifdef HAVE_V4L2
+#ifdef CONFIG_VIDEO_V4L2
/* get the status of a buffer in the clients buffer queue */
static int
zoran_v4l2_buffer_status (struct file *file,
@@ -2679,7 +2679,7 @@ zoran_do_ioctl (struct inode *inode,
}
break;
-#ifdef HAVE_V4L2
+#ifdef CONFIG_VIDEO_V4L2
/* The new video4linux2 capture interface - much nicer than video4linux1, since
* it allows for integrating the JPEG capturing calls inside standard v4l2
@@ -4692,7 +4692,7 @@ static struct file_operations zoran_fops = {
struct video_device zoran_template __devinitdata = {
.name = ZORAN_NAME,
.type = ZORAN_VID_TYPE,
-#ifdef HAVE_V4L2
+#ifdef CONFIG_VIDEO_V4L2
.type2 = ZORAN_V4L2_VID_FLAGS,
#endif
.hardware = ZORAN_HARDWARE,
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. */