summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/videodev.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-07-23 06:31:19 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-07-23 06:31:19 -0300
commitb4e1b90af5a9c2712330b9ed882e8953244be9a8 (patch)
tree22a8009b3011758edc72864531354f7c3c899633 /linux/drivers/media/video/videodev.c
parentbb7f5a89eeea423828328f3af1b7097c15d60e7e (diff)
downloadmediapointer-dvb-s2-b4e1b90af5a9c2712330b9ed882e8953244be9a8.tar.gz
mediapointer-dvb-s2-b4e1b90af5a9c2712330b9ed882e8953244be9a8.tar.bz2
Fix for compilation without V4L1 or V4L1_COMPAT
From: Mauro Carvalho Chehab <mchehab@infradead.org> Removed usage of HAVE_V4L1 Including videodev.h will just include videodev2.h if V4L1 is not supported V4L1 code at core drivers will honor CONFIG_V4L1_COMPAT stuff Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/videodev.c')
-rw-r--r--linux/drivers/media/video/videodev.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c
index 7d0076a0f..a4b2bfd28 100644
--- a/linux/drivers/media/video/videodev.c
+++ b/linux/drivers/media/video/videodev.c
@@ -779,7 +779,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
ret=vfd->vidioc_overlay(file, fh, *i);
break;
}
-#ifdef HAVE_V4L1
+#ifdef CONFIG_V4L1_COMPAT
/* --- streaming capture ------------------------------------- */
case VIDIOCGMBUF:
{
@@ -1599,9 +1599,17 @@ int video_register_device(struct video_device *vfd, int type, int nr)
__FUNCTION__);
return ret;
}
- video_device_create_file(vfd, &class_device_attr_name);
+ ret = class_device_create_file(&vfd->class_dev, &class_device_attr_name);
+ if (ret < 0) {
+ printk(KERN_WARNING "%s error: %d\n", __FUNCTION__, ret);
+ return ret;
+ }
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
- video_device_create_file(vfd, &class_device_attr_dev);
+ ret = class_device_create_file(&vfd->class_dev, &class_device_attr_dev);
+ if (ret < 0) {
+ printk(KERN_WARNING "%s error: %d\n", __FUNCTION__, ret);
+ return ret;
+ }
#endif
#if 1 /* keep */