updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / qc-usb / qc-usb-0.6.6-kcompat-2.6.37.patch
blob1a68a2dab545e130b59ea9cd3ef2381125b1813e
1 diff -wbBur qc-usb-0.6.6/qc-driver.c qc-usb-0.6.6.my/qc-driver.c
2 --- qc-usb-0.6.6/qc-driver.c 2006-10-24 02:06:19.000000000 +0000
3 +++ qc-usb-0.6.6.my/qc-driver.c 2011-02-03 15:44:45.000000000 +0000
4 @@ -43,15 +43,15 @@
5 */
6 /* }}} */
7 /* {{{ [fold] Includes */
9 +#define UTS_RELEASE ""
11 #ifdef NOKERNEL
12 #include "quickcam.h"
13 #else
14 #include <linux/quickcam.h>
15 #endif
16 #include <linux/version.h>
17 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)) || (HAVE_UTSRELEASE_H == 1)
18 -#include <linux/utsrelease.h>
19 -#endif
20 #include <linux/module.h>
22 #include "qc-memory.h"
23 @@ -190,7 +190,7 @@
26 static LIST_HEAD(quickcam_list); /* Linked list containing all QuickCams */
27 -static DECLARE_MUTEX(quickcam_list_lock); /* Always lock first quickcam_list_lock, then qc->lock */
28 +static struct semaphore quickcam_list_lock; /* Always lock first quickcam_list_lock, then qc->lock */
30 /* Default values for user-specified lookup-table; may be overwritten by user */
31 static unsigned char userlut_contents[QC_LUT_SIZE] = {
32 @@ -994,7 +996,7 @@
33 PRINTK(KERN_WARNING,"Could not register procfs file entry");
34 return -ENXIO;
36 - entry->owner = THIS_MODULE;
37 +// entry->owner = THIS_MODULE;
38 entry->data = qc;
39 entry->read_proc = qc_proc_read;
40 entry->write_proc = qc_proc_write;
41 @@ -1032,7 +1034,7 @@
42 return -ENXIO;
45 - qc_proc_entry->owner = THIS_MODULE;
46 +// qc_proc_entry->owner = THIS_MODULE;
47 return 0;
49 /* }}} */
50 @@ -2997,7 +3023,7 @@
51 release: qc_v4l_close,
52 read: qc_v4l_read,
53 // write: qc_v4l_write,
54 - ioctl: qc_v4l_ioctl,
55 + compat_ioctl: qc_v4l_ioctl,
56 mmap: qc_v4l_mmap,
57 poll: qc_v4l_poll,
59 @@ -3103,7 +3130,7 @@
60 PDEBUG("poisoning qc in qc_usb_init");
61 POISON(*qc);
62 if (qcdebug&QC_DEBUGMUTEX) PDEBUG("init down(%p) in qc_usb_init()", qc);
63 - init_MUTEX_LOCKED(&qc->lock);
64 + sema_init(&qc->lock, 1);
65 qc->users = 0;
66 if ((r=qc_i2c_init(qc))<0) goto fail2;
68 diff -wbBur qc-usb-0.6.6/qc-memory.c qc-usb-0.6.6.my/qc-memory.c
69 --- qc-usb-0.6.6/qc-memory.c 2006-11-04 13:34:32.000000000 +0000
70 +++ qc-usb-0.6.6.my/qc-memory.c 2011-02-03 15:45:30.000000000 +0000
71 @@ -27,7 +27,7 @@
73 /* }}} */
74 /* {{{ [fold] Includes */
75 -#include <linux/autoconf.h>
76 +#include <generated/autoconf.h>
77 #include <linux/version.h>
79 #ifdef CONFIG_SMP
80 diff -wbBur qc-usb-0.6.6/quickcam.h qc-usb-0.6.6.my/quickcam.h
81 --- qc-usb-0.6.6/quickcam.h 2006-11-04 13:38:27.000000000 +0000
82 +++ qc-usb-0.6.6.my/quickcam.h 2011-02-03 15:38:57.000000000 +0000
83 @@ -76,7 +76,7 @@
85 #ifdef __KERNEL__
87 -#include <linux/autoconf.h>
88 +#include <generated/autoconf.h>
89 #include <linux/version.h>
91 #ifdef CONFIG_SMP