#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 ( \
{
.name = "15-bit RGB",
.palette = VIDEO_PALETTE_RGB555,
-#ifdef HAVE_V4L2
+#ifdef CONFIG_VIDEO_V4L2
#ifdef __LITTLE_ENDIAN
.fourcc = V4L2_PIX_FMT_RGB555,
#else
}, {
.name = "16-bit RGB",
.palette = VIDEO_PALETTE_RGB565,
-#ifdef HAVE_V4L2
+#ifdef CONFIG_VIDEO_V4L2
#ifdef __LITTLE_ENDIAN
.fourcc = V4L2_PIX_FMT_RGB565,
#else
}, {
.name = "24-bit RGB",
.palette = VIDEO_PALETTE_RGB24,
-#ifdef HAVE_V4L2
+#ifdef CONFIG_VIDEO_V4L2
#ifdef __LITTLE_ENDIAN
.fourcc = V4L2_PIX_FMT_BGR24,
#else
}, {
.name = "32-bit RGB",
.palette = VIDEO_PALETTE_RGB32,
-#ifdef HAVE_V4L2
+#ifdef CONFIG_VIDEO_V4L2
#ifdef __LITTLE_ENDIAN
.fourcc = V4L2_PIX_FMT_BGR32,
#else
}, {
.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
}, {
.name = "Hardware-encoded Motion-JPEG",
.palette = -1,
-#ifdef HAVE_V4L2
+#ifdef CONFIG_VIDEO_V4L2
.fourcc = V4L2_PIX_FMT_MJPEG,
.colorspace = V4L2_COLORSPACE_SMPTE170M,
#endif
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 */
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,
}
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
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,
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
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*);
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)
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 */