diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-06-22 13:40:17 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2008-06-22 13:40:17 +0200 |
commit | 9ff38aabb146a5ba0d109a0c2f3c04fdcdc33e5f (patch) | |
tree | e74752d9610f9bdf3f83d088d95c68948d377c9e /linux/drivers/media/video | |
parent | c7a67c1cdfedefe02daf3c0116e2622d70b31195 (diff) | |
download | mediapointer-dvb-s2-9ff38aabb146a5ba0d109a0c2f3c04fdcdc33e5f.tar.gz mediapointer-dvb-s2-9ff38aabb146a5ba0d109a0c2f3c04fdcdc33e5f.tar.bz2 |
videodev: fix compilation issue for kernels < 2.6.25
From: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/videodev.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c index da78f4578..63e4db68d 100644 --- a/linux/drivers/media/video/videodev.c +++ b/linux/drivers/media/video/videodev.c @@ -375,8 +375,12 @@ EXPORT_SYMBOL(v4l_printk_ioctl); * sysfs stuff */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) +static ssize_t show_index(struct class_device *cd, char *buf) +#else static ssize_t show_index(struct device *cd, struct device_attribute *attr, char *buf) +#endif { struct video_device *vfd = container_of(cd, struct video_device, class_dev); @@ -394,6 +398,7 @@ static ssize_t show_name(struct device *cd, class_dev); return sprintf(buf, "%.*s\n", (int)sizeof(vfd->name), vfd->name); } + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12) static ssize_t show_dev(struct class_device *cd, char *buf) { @@ -1947,6 +1952,7 @@ out: } EXPORT_SYMBOL(video_ioctl2); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) struct index_info { struct device *dev; unsigned int used[VIDEO_NUM_DEVICES]; @@ -2014,6 +2020,7 @@ out: kfree(info); return ret; } +#endif static const struct file_operations video_fops; @@ -2107,7 +2114,11 @@ int video_register_device_index(struct video_device *vfd, int type, int nr, video_device[i]=vfd; vfd->minor=i; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) ret = get_index(vfd, index); +#else + ret = 0; +#endif if (ret < 0) { printk(KERN_ERR "%s: get_index failed\n", __func__); |