updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / avld / avld_0.1.4.patch
blob07ec2da07699de96f5b5ac149db8f3c7cceb5469
1 diff -Naur a/video_device.c b/video_device.c
2 --- a/video_device.c 2008-11-09 16:54:51.000000000 +0100
3 +++ b/video_device.c 2010-01-12 15:15:52.000000000 +0100
4 @@ -111,8 +111,12 @@
5 /************************************************
6 **************** V4L FUNCTIONS ***************
7 ************************************************/
8 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
9 static int v4l_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) {
11 +#else
12 +static int v4l_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
13 +#endif
15 switch(cmd) {
16 /* Get capabilities */
17 case VIDIOCGCAP:
18 @@ -374,8 +378,12 @@
22 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
23 static int v4l_open(struct inode *inode, struct file *file) {
25 +#else
26 +static int v4l_open(struct file *file) {
27 +#endif
29 #ifdef DEBUG
30 printk(KERNEL_PREFIX "entering v4l_open()\n");
31 #endif
32 @@ -386,8 +394,13 @@
34 return 0;
37 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
38 static int v4l_close(struct inode *inode, struct file *file) {
40 +#else
41 +static int v4l_close(struct file *file) {
42 +#endif
44 #ifdef DEBUG
45 printk(KERNEL_PREFIX "entering v4l_close()\n");
46 #endif
47 @@ -397,9 +410,6 @@
48 return 0;
54 static int v4l_mmap(struct file *file, struct vm_area_struct *vma) {
56 struct page *page = NULL;
57 @@ -616,7 +626,11 @@
58 //kfree(vdev);
61 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
62 static struct file_operations v4l_fops = {
63 +#else
64 +static struct v4l2_file_operations v4l_fops = {
65 +#endif
66 owner: THIS_MODULE,
67 open: v4l_open,
68 release: v4l_close,
69 @@ -624,8 +638,10 @@
70 mmap: v4l_mmap,
71 write: v4l_write,
72 ioctl: v4l_ioctl,
73 +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
74 compat_ioctl: v4l_compat_ioctl32,
75 llseek: no_llseek,
76 +#endif
78 static struct video_device my_device = {
79 name: "Dummy video device",