diff options
Diffstat (limited to 'drivers/media/video/vino.c')
-rw-r--r-- | drivers/media/video/vino.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/drivers/media/video/vino.c b/drivers/media/video/vino.c index 1edda456fc64..8ec57df1904f 100644 --- a/drivers/media/video/vino.c +++ b/drivers/media/video/vino.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <linux/i2c-algo-sgi.h> | 39 | #include <linux/i2c-algo-sgi.h> |
40 | 40 | ||
41 | #include <linux/videodev2.h> | 41 | #include <linux/videodev2.h> |
42 | #include <media/v4l2-ioctl.h> | ||
43 | #include <media/v4l2-common.h> | 42 | #include <media/v4l2-common.h> |
44 | #include <media/v4l2-ioctl.h> | 43 | #include <media/v4l2-ioctl.h> |
45 | #include <linux/video_decoder.h> | 44 | #include <linux/video_decoder.h> |
@@ -810,7 +809,7 @@ static void vino_free_buffer_with_count(struct vino_framebuffer *fb, | |||
810 | dprintk("vino_free_buffer_with_count(): count = %d\n", count); | 809 | dprintk("vino_free_buffer_with_count(): count = %d\n", count); |
811 | 810 | ||
812 | for (i = 0; i < count; i++) { | 811 | for (i = 0; i < count; i++) { |
813 | ClearPageReserved(virt_to_page(fb->desc_table.virtual[i])); | 812 | ClearPageReserved(virt_to_page((void *)fb->desc_table.virtual[i])); |
814 | dma_unmap_single(NULL, | 813 | dma_unmap_single(NULL, |
815 | fb->desc_table.dma_cpu[VINO_PAGE_RATIO * i], | 814 | fb->desc_table.dma_cpu[VINO_PAGE_RATIO * i], |
816 | PAGE_SIZE, DMA_FROM_DEVICE); | 815 | PAGE_SIZE, DMA_FROM_DEVICE); |
@@ -888,7 +887,7 @@ static int vino_allocate_buffer(struct vino_framebuffer *fb, | |||
888 | dma_data_addr + VINO_PAGE_SIZE * j; | 887 | dma_data_addr + VINO_PAGE_SIZE * j; |
889 | } | 888 | } |
890 | 889 | ||
891 | SetPageReserved(virt_to_page(fb->desc_table.virtual[i])); | 890 | SetPageReserved(virt_to_page((void *)fb->desc_table.virtual[i])); |
892 | } | 891 | } |
893 | 892 | ||
894 | /* page_count needs to be set anyway, because the descriptor table has | 893 | /* page_count needs to be set anyway, because the descriptor table has |
@@ -975,7 +974,7 @@ static int vino_prepare_user_buffer(struct vino_framebuffer *fb, | |||
975 | dma_data_addr + VINO_PAGE_SIZE * j; | 974 | dma_data_addr + VINO_PAGE_SIZE * j; |
976 | } | 975 | } |
977 | 976 | ||
978 | SetPageReserved(virt_to_page(fb->desc_table.virtual[i])); | 977 | SetPageReserved(virt_to_page((void *)fb->desc_table.virtual[i])); |
979 | } | 978 | } |
980 | 979 | ||
981 | /* page_count needs to be set anyway, because the descriptor table has | 980 | /* page_count needs to be set anyway, because the descriptor table has |
@@ -4025,8 +4024,7 @@ out: | |||
4025 | 4024 | ||
4026 | static int vino_open(struct inode *inode, struct file *file) | 4025 | static int vino_open(struct inode *inode, struct file *file) |
4027 | { | 4026 | { |
4028 | struct video_device *dev = video_devdata(file); | 4027 | struct vino_channel_settings *vcs = video_drvdata(file); |
4029 | struct vino_channel_settings *vcs = video_get_drvdata(dev); | ||
4030 | int ret = 0; | 4028 | int ret = 0; |
4031 | dprintk("open(): channel = %c\n", | 4029 | dprintk("open(): channel = %c\n", |
4032 | (vcs->channel == VINO_CHANNEL_A) ? 'A' : 'B'); | 4030 | (vcs->channel == VINO_CHANNEL_A) ? 'A' : 'B'); |
@@ -4057,8 +4055,7 @@ static int vino_open(struct inode *inode, struct file *file) | |||
4057 | 4055 | ||
4058 | static int vino_close(struct inode *inode, struct file *file) | 4056 | static int vino_close(struct inode *inode, struct file *file) |
4059 | { | 4057 | { |
4060 | struct video_device *dev = video_devdata(file); | 4058 | struct vino_channel_settings *vcs = video_drvdata(file); |
4061 | struct vino_channel_settings *vcs = video_get_drvdata(dev); | ||
4062 | dprintk("close():\n"); | 4059 | dprintk("close():\n"); |
4063 | 4060 | ||
4064 | mutex_lock(&vcs->mutex); | 4061 | mutex_lock(&vcs->mutex); |
@@ -4101,8 +4098,7 @@ static struct vm_operations_struct vino_vm_ops = { | |||
4101 | 4098 | ||
4102 | static int vino_mmap(struct file *file, struct vm_area_struct *vma) | 4099 | static int vino_mmap(struct file *file, struct vm_area_struct *vma) |
4103 | { | 4100 | { |
4104 | struct video_device *dev = video_devdata(file); | 4101 | struct vino_channel_settings *vcs = video_drvdata(file); |
4105 | struct vino_channel_settings *vcs = video_get_drvdata(dev); | ||
4106 | 4102 | ||
4107 | unsigned long start = vma->vm_start; | 4103 | unsigned long start = vma->vm_start; |
4108 | unsigned long size = vma->vm_end - vma->vm_start; | 4104 | unsigned long size = vma->vm_end - vma->vm_start; |
@@ -4207,8 +4203,7 @@ out: | |||
4207 | 4203 | ||
4208 | static unsigned int vino_poll(struct file *file, poll_table *pt) | 4204 | static unsigned int vino_poll(struct file *file, poll_table *pt) |
4209 | { | 4205 | { |
4210 | struct video_device *dev = video_devdata(file); | 4206 | struct vino_channel_settings *vcs = video_drvdata(file); |
4211 | struct vino_channel_settings *vcs = video_get_drvdata(dev); | ||
4212 | unsigned int outgoing; | 4207 | unsigned int outgoing; |
4213 | unsigned int ret = 0; | 4208 | unsigned int ret = 0; |
4214 | 4209 | ||
@@ -4248,8 +4243,7 @@ error: | |||
4248 | static int vino_do_ioctl(struct inode *inode, struct file *file, | 4243 | static int vino_do_ioctl(struct inode *inode, struct file *file, |
4249 | unsigned int cmd, void *arg) | 4244 | unsigned int cmd, void *arg) |
4250 | { | 4245 | { |
4251 | struct video_device *dev = video_devdata(file); | 4246 | struct vino_channel_settings *vcs = video_drvdata(file); |
4252 | struct vino_channel_settings *vcs = video_get_drvdata(dev); | ||
4253 | 4247 | ||
4254 | #ifdef VINO_DEBUG | 4248 | #ifdef VINO_DEBUG |
4255 | switch (_IOC_TYPE(cmd)) { | 4249 | switch (_IOC_TYPE(cmd)) { |
@@ -4356,8 +4350,7 @@ static int vino_do_ioctl(struct inode *inode, struct file *file, | |||
4356 | static int vino_ioctl(struct inode *inode, struct file *file, | 4350 | static int vino_ioctl(struct inode *inode, struct file *file, |
4357 | unsigned int cmd, unsigned long arg) | 4351 | unsigned int cmd, unsigned long arg) |
4358 | { | 4352 | { |
4359 | struct video_device *dev = video_devdata(file); | 4353 | struct vino_channel_settings *vcs = video_drvdata(file); |
4360 | struct vino_channel_settings *vcs = video_get_drvdata(dev); | ||
4361 | int ret; | 4354 | int ret; |
4362 | 4355 | ||
4363 | if (mutex_lock_interruptible(&vcs->mutex)) | 4356 | if (mutex_lock_interruptible(&vcs->mutex)) |