diff options
Diffstat (limited to 'linux/drivers/media/video/usbvision/usbvision-video.c')
-rw-r--r-- | linux/drivers/media/video/usbvision/usbvision-video.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/linux/drivers/media/video/usbvision/usbvision-video.c b/linux/drivers/media/video/usbvision/usbvision-video.c index 1d0d61469..89aedd783 100644 --- a/linux/drivers/media/video/usbvision/usbvision-video.c +++ b/linux/drivers/media/video/usbvision/usbvision-video.c @@ -46,7 +46,6 @@ #include <linux/version.h> #include <linux/kernel.h> -#include <linux/sched.h> #include <linux/list.h> #include <linux/timer.h> #include <linux/slab.h> @@ -562,7 +561,7 @@ static int usbvision_v4l2_do_ioctl(struct inode *inode, struct file *file, struct v4l2_register *reg = arg; int errCode; - if (reg->i2c_id != 0) + if (!v4l2_chip_match_host(reg->match_type, reg->match_chip)) return -EINVAL; if (!capable(CAP_SYS_ADMIN)) return -EPERM; @@ -581,7 +580,7 @@ static int usbvision_v4l2_do_ioctl(struct inode *inode, struct file *file, PDEBUG(DBG_IOCTL, "VIDIOC_DBG_%c_REGISTER reg=0x%02X, value=0x%02X", cmd == VIDIOC_DBG_G_REGISTER ? 'G' : 'S', - (unsigned int)reg->reg, reg->val); + (unsigned int)reg->reg, (unsigned int)reg->val); return 0; } #endif @@ -1255,21 +1254,11 @@ static int usbvision_v4l2_mmap(struct file *file, struct vm_area_struct *vma) pos = usbvision->frame[i].data; while (size > 0) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) - unsigned long page = vmalloc_to_pfn(pos); - if (remap_pfn_range(vma, start, page, PAGE_SIZE, - vma->vm_page_prot)) { - PDEBUG(DBG_MMAP, "mmap: rename page map failed"); - up(&usbvision->lock); - return -EAGAIN; - } -#else if (vm_insert_page(vma, start, vmalloc_to_page(pos))) { PDEBUG(DBG_MMAP, "mmap: vm_insert_page failed"); up(&usbvision->lock); return -EAGAIN; } -#endif start += PAGE_SIZE; pos += PAGE_SIZE; size -= PAGE_SIZE; @@ -1599,7 +1588,7 @@ static struct video_device usbvision_video_template = { .minor = -1, }; #else -static struct file_operations usbvision_fops = { +static const struct file_operations usbvision_fops = { #if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,31) .owner = THIS_MODULE, #endif @@ -1640,7 +1629,7 @@ static struct video_device usbvision_radio_template= minor: -1, }; #else -static struct file_operations usbvision_radio_fops = { +static const struct file_operations usbvision_radio_fops = { #if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,31) .owner = THIS_MODULE, #endif @@ -1679,7 +1668,7 @@ static struct video_device usbvision_vbi_template= minor: -1, }; #else -static struct file_operations usbvision_vbi_fops = { +static const struct file_operations usbvision_vbi_fops = { #if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,31) .owner = THIS_MODULE, #endif |