aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/vino.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/vino.c')
-rw-r--r--drivers/media/video/vino.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/drivers/media/video/vino.c b/drivers/media/video/vino.c
index 1edda456fc64..1efc5f3462c6 100644
--- a/drivers/media/video/vino.c
+++ b/drivers/media/video/vino.c
@@ -30,16 +30,12 @@
30#include <linux/mm.h> 30#include <linux/mm.h>
31#include <linux/time.h> 31#include <linux/time.h>
32#include <linux/version.h> 32#include <linux/version.h>
33
34#ifdef CONFIG_KMOD
35#include <linux/kmod.h> 33#include <linux/kmod.h>
36#endif
37 34
38#include <linux/i2c.h> 35#include <linux/i2c.h>
39#include <linux/i2c-algo-sgi.h> 36#include <linux/i2c-algo-sgi.h>
40 37
41#include <linux/videodev2.h> 38#include <linux/videodev2.h>
42#include <media/v4l2-ioctl.h>
43#include <media/v4l2-common.h> 39#include <media/v4l2-common.h>
44#include <media/v4l2-ioctl.h> 40#include <media/v4l2-ioctl.h>
45#include <linux/video_decoder.h> 41#include <linux/video_decoder.h>
@@ -810,7 +806,7 @@ static void vino_free_buffer_with_count(struct vino_framebuffer *fb,
810 dprintk("vino_free_buffer_with_count(): count = %d\n", count); 806 dprintk("vino_free_buffer_with_count(): count = %d\n", count);
811 807
812 for (i = 0; i < count; i++) { 808 for (i = 0; i < count; i++) {
813 ClearPageReserved(virt_to_page(fb->desc_table.virtual[i])); 809 ClearPageReserved(virt_to_page((void *)fb->desc_table.virtual[i]));
814 dma_unmap_single(NULL, 810 dma_unmap_single(NULL,
815 fb->desc_table.dma_cpu[VINO_PAGE_RATIO * i], 811 fb->desc_table.dma_cpu[VINO_PAGE_RATIO * i],
816 PAGE_SIZE, DMA_FROM_DEVICE); 812 PAGE_SIZE, DMA_FROM_DEVICE);
@@ -888,7 +884,7 @@ static int vino_allocate_buffer(struct vino_framebuffer *fb,
888 dma_data_addr + VINO_PAGE_SIZE * j; 884 dma_data_addr + VINO_PAGE_SIZE * j;
889 } 885 }
890 886
891 SetPageReserved(virt_to_page(fb->desc_table.virtual[i])); 887 SetPageReserved(virt_to_page((void *)fb->desc_table.virtual[i]));
892 } 888 }
893 889
894 /* page_count needs to be set anyway, because the descriptor table has 890 /* page_count needs to be set anyway, because the descriptor table has
@@ -975,7 +971,7 @@ static int vino_prepare_user_buffer(struct vino_framebuffer *fb,
975 dma_data_addr + VINO_PAGE_SIZE * j; 971 dma_data_addr + VINO_PAGE_SIZE * j;
976 } 972 }
977 973
978 SetPageReserved(virt_to_page(fb->desc_table.virtual[i])); 974 SetPageReserved(virt_to_page((void *)fb->desc_table.virtual[i]));
979 } 975 }
980 976
981 /* page_count needs to be set anyway, because the descriptor table has 977 /* page_count needs to be set anyway, because the descriptor table has
@@ -4025,8 +4021,7 @@ out:
4025 4021
4026static int vino_open(struct inode *inode, struct file *file) 4022static int vino_open(struct inode *inode, struct file *file)
4027{ 4023{
4028 struct video_device *dev = video_devdata(file); 4024 struct vino_channel_settings *vcs = video_drvdata(file);
4029 struct vino_channel_settings *vcs = video_get_drvdata(dev);
4030 int ret = 0; 4025 int ret = 0;
4031 dprintk("open(): channel = %c\n", 4026 dprintk("open(): channel = %c\n",
4032 (vcs->channel == VINO_CHANNEL_A) ? 'A' : 'B'); 4027 (vcs->channel == VINO_CHANNEL_A) ? 'A' : 'B');
@@ -4057,8 +4052,7 @@ static int vino_open(struct inode *inode, struct file *file)
4057 4052
4058static int vino_close(struct inode *inode, struct file *file) 4053static int vino_close(struct inode *inode, struct file *file)
4059{ 4054{
4060 struct video_device *dev = video_devdata(file); 4055 struct vino_channel_settings *vcs = video_drvdata(file);
4061 struct vino_channel_settings *vcs = video_get_drvdata(dev);
4062 dprintk("close():\n"); 4056 dprintk("close():\n");
4063 4057
4064 mutex_lock(&vcs->mutex); 4058 mutex_lock(&vcs->mutex);
@@ -4101,8 +4095,7 @@ static struct vm_operations_struct vino_vm_ops = {
4101 4095
4102static int vino_mmap(struct file *file, struct vm_area_struct *vma) 4096static int vino_mmap(struct file *file, struct vm_area_struct *vma)
4103{ 4097{
4104 struct video_device *dev = video_devdata(file); 4098 struct vino_channel_settings *vcs = video_drvdata(file);
4105 struct vino_channel_settings *vcs = video_get_drvdata(dev);
4106 4099
4107 unsigned long start = vma->vm_start; 4100 unsigned long start = vma->vm_start;
4108 unsigned long size = vma->vm_end - vma->vm_start; 4101 unsigned long size = vma->vm_end - vma->vm_start;
@@ -4207,8 +4200,7 @@ out:
4207 4200
4208static unsigned int vino_poll(struct file *file, poll_table *pt) 4201static unsigned int vino_poll(struct file *file, poll_table *pt)
4209{ 4202{
4210 struct video_device *dev = video_devdata(file); 4203 struct vino_channel_settings *vcs = video_drvdata(file);
4211 struct vino_channel_settings *vcs = video_get_drvdata(dev);
4212 unsigned int outgoing; 4204 unsigned int outgoing;
4213 unsigned int ret = 0; 4205 unsigned int ret = 0;
4214 4206
@@ -4248,8 +4240,7 @@ error:
4248static int vino_do_ioctl(struct inode *inode, struct file *file, 4240static int vino_do_ioctl(struct inode *inode, struct file *file,
4249 unsigned int cmd, void *arg) 4241 unsigned int cmd, void *arg)
4250{ 4242{
4251 struct video_device *dev = video_devdata(file); 4243 struct vino_channel_settings *vcs = video_drvdata(file);
4252 struct vino_channel_settings *vcs = video_get_drvdata(dev);
4253 4244
4254#ifdef VINO_DEBUG 4245#ifdef VINO_DEBUG
4255 switch (_IOC_TYPE(cmd)) { 4246 switch (_IOC_TYPE(cmd)) {
@@ -4356,8 +4347,7 @@ static int vino_do_ioctl(struct inode *inode, struct file *file,
4356static int vino_ioctl(struct inode *inode, struct file *file, 4347static int vino_ioctl(struct inode *inode, struct file *file,
4357 unsigned int cmd, unsigned long arg) 4348 unsigned int cmd, unsigned long arg)
4358{ 4349{
4359 struct video_device *dev = video_devdata(file); 4350 struct vino_channel_settings *vcs = video_drvdata(file);
4360 struct vino_channel_settings *vcs = video_get_drvdata(dev);
4361 int ret; 4351 int ret;
4362 4352
4363 if (mutex_lock_interruptible(&vcs->mutex)) 4353 if (mutex_lock_interruptible(&vcs->mutex))
@@ -4641,7 +4631,7 @@ static int __init vino_module_init(void)
4641 } 4631 }
4642 vino_init_stage++; 4632 vino_init_stage++;
4643 4633
4644#if defined(CONFIG_KMOD) && defined(MODULE) 4634#ifdef MODULE
4645 request_module("saa7191"); 4635 request_module("saa7191");
4646 request_module("indycam"); 4636 request_module("indycam");
4647#endif 4637#endif