diff options
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__); |