updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / qc-usb-messenger / qc-usb-messenger-kernel-2.6.33.patch
blobb4f6f9833a77abc2217ab730617029d7e30b38b2
1 Only in qc-usb-messenger-1.8.my: input_read
2 Only in qc-usb-messenger-1.8.my: modules.order
3 Only in qc-usb-messenger-1.8.my: Module.symvers
4 diff -wbBur qc-usb-messenger-1.8/qc-driver.c qc-usb-messenger-1.8.my/qc-driver.c
5 --- qc-usb-messenger-1.8/qc-driver.c 2008-05-26 11:29:16.000000000 +0000
6 +++ qc-usb-messenger-1.8.my/qc-driver.c 2010-04-12 15:59:23.000000000 +0000
7 @@ -49,10 +49,8 @@
8 #include <linux/quickcam.h>
9 #endif
10 #include <linux/version.h>
11 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)) || (HAVE_UTSRELEASE_H == 1)
12 -#include <linux/utsrelease.h>
13 -#endif
14 -#include <linux/autoconf.h>
15 +#include <generated/utsrelease.h>
16 +#include <generated/autoconf.h>
17 #include <linux/module.h>
19 #include "qc-memory.h"
20 @@ -1124,7 +1122,6 @@
21 PRINTK(KERN_WARNING,"Could not register procfs file entry");
22 return -ENXIO;
24 - entry->owner = THIS_MODULE;
25 entry->data = qc;
26 entry->read_proc = qc_proc_read;
27 entry->write_proc = qc_proc_write;
28 @@ -1137,7 +1134,6 @@
29 PRINTK(KERN_WARNING,"Could not register procfs file entry");
30 return -ENXIO;
32 - entry->owner = THIS_MODULE;
33 entry->data = qc;
34 entry->read_proc = qc_proc_button_read;
35 entry->write_proc = qc_proc_write;
36 @@ -1179,13 +1175,11 @@
37 PRINTK(KERN_WARNING,"Could not register procfs dir entry");
38 return -ENXIO;
40 - qc_proc_video_entry->owner = THIS_MODULE;
41 qc_proc_quickcam_entry = create_proc_entry(qc_proc_quickcam_name, S_IFDIR, qc_proc_video_entry);
42 if (!qc_proc_quickcam_entry) {
43 PRINTK(KERN_WARNING,"Could not register procfs dir entry");
44 return -ENXIO;
46 - qc_proc_quickcam_entry->owner = THIS_MODULE;
47 return 0;
49 /* }}} */
50 @@ -2622,7 +2616,11 @@
51 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
52 struct video_device *dev = video_devdata(file);
53 #endif
54 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
55 + struct quickcam *qc = (struct quickcam *)video_get_drvdata(dev);
56 +#else
57 struct quickcam *qc = (struct quickcam *)dev->priv;
58 +#endif
59 struct qc_frame_data *fd = &qc->frame_data;
60 int mask;
62 @@ -2674,7 +2672,11 @@
63 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
64 struct video_device *dev = video_devdata(file);
65 #endif
66 - struct quickcam *qc = dev->priv;
67 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
68 + struct quickcam *qc = (struct quickcam *)video_get_drvdata(dev);
69 +#else
70 + struct quickcam *qc = (struct quickcam *)dev->priv;
71 +#endif
72 int r;
74 if (qcdebug&QC_DEBUGLOGIC || qcdebug&QC_DEBUGUSER) PDEBUG("qc_v4l_open(qc=%p)", qc);
75 @@ -2739,7 +2741,11 @@
76 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
77 struct video_device *dev = video_devdata(file);
78 #endif
79 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
80 + struct quickcam *qc = (struct quickcam *)video_get_drvdata(dev);
81 +#else
82 struct quickcam *qc = (struct quickcam *)dev->priv;
83 +#endif
84 if (qcdebug&QC_DEBUGLOGIC || qcdebug&QC_DEBUGUSER) PDEBUG("qc_v4l_close(dev=%p,qc=%p)",dev,qc);
86 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
87 @@ -2788,7 +2794,11 @@
88 struct video_device *dev = video_devdata(file);
89 int noblock = file->f_flags & O_NONBLOCK;
90 #endif
91 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
92 + struct quickcam *qc = (struct quickcam *)video_get_drvdata(dev);
93 +#else
94 struct quickcam *qc = (struct quickcam *)dev->priv;
95 +#endif
96 int frame_len;
97 unsigned char *frame;
98 long r = 0;
99 @@ -2845,7 +2855,11 @@
100 const void *start = (void *)vma->vm_start;
101 unsigned long size = vma->vm_end - vma->vm_start;
102 #endif
103 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
104 + struct quickcam *qc = (struct quickcam *)video_get_drvdata(dev);
105 +#else
106 struct quickcam *qc = (struct quickcam *)dev->priv;
107 +#endif
108 unsigned char *frame;
109 int ret = 0, frame_size;
110 #if !HAVE_VMA && LINUX_VERSION_CODE<KERNEL_VERSION(2,6,0)
111 @@ -2877,7 +2891,11 @@
112 struct video_device *dev = video_devdata(file);
113 void *argp = (void *)arg;
114 #endif
115 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
116 + struct quickcam *qc = (struct quickcam *)video_get_drvdata(dev);
117 +#else
118 struct quickcam *qc = (struct quickcam *)dev->priv;
119 +#endif
120 int i, retval = 0;
122 if (qcdebug&QC_DEBUGLOGIC || qcdebug&QC_DEBUGUSER) PDEBUG("qc_v4l_ioctl(dev=%p,cmd=%u,arg=%p,qc=%p)",dev,cmd,argp,qc);
123 @@ -2895,7 +2913,7 @@
124 if (qcdebug&QC_DEBUGUSER) PDEBUG("VIDIOCGCAP");
125 memset(&b, 0, sizeof(b));
126 strcpy(b.name, "Logitech QuickCam USB"); /* Max 31 characters */
127 - b.type = qc->vdev.type;
128 + b.type = qc->vdev.vfl_type;
129 b.channels = 1;
130 b.audios = 0;
131 b.maxwidth = qc->sensor_data.maxwidth;
132 @@ -3484,7 +3502,7 @@
134 static struct video_device qc_v4l_template = {
135 name: "QuickCam USB",
136 - type: VID_TYPE_CAPTURE, // | VID_TYPE_SUBCAPTURE,
137 + vfl_type: VID_TYPE_CAPTURE, // | VID_TYPE_SUBCAPTURE,
138 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
139 hardware: VID_HARDWARE_QCAM_USB,
140 #endif
141 @@ -3662,7 +3680,7 @@
142 #endif
143 /* Register input device for button */
144 qc->input_ptr->name = "Quickcam snapshot button";
145 - qc->input_ptr->private = qc;
146 + input_set_drvdata(qc->input_ptr, qc);
147 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
148 qc->input_ptr->evbit[0] = BIT_MASK(EV_KEY);
149 qc->input_ptr->keybit[BIT_WORD(BTN_0)] = BIT_MASK(BTN_0);
150 @@ -3736,7 +3754,12 @@
152 /* Register V4L video device */
153 memcpy(&qc->vdev, &qc_v4l_template, sizeof(qc_v4l_template));
155 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
156 + video_set_drvdata(&qc->vdev, qc);
157 +#else
158 qc->vdev.priv = qc;
159 +#endif
161 mb();
162 r = video_register_device(&qc->vdev, VFL_TYPE_GRABBER, video_nr);
163 Only in qc-usb-messenger-1.8.my: qc-driver.c.rej
164 Only in qc-usb-messenger-1.8.my: qc-driver.o
165 Only in qc-usb-messenger-1.8.my: .qc-driver.o.cmd
166 Only in qc-usb-messenger-1.8.my: qc-formats.o
167 Only in qc-usb-messenger-1.8.my: .qc-formats.o.cmd
168 diff -wbBur qc-usb-messenger-1.8/qc-memory.c qc-usb-messenger-1.8.my/qc-memory.c
169 --- qc-usb-messenger-1.8/qc-memory.c 2006-11-05 06:36:51.000000000 +0000
170 +++ qc-usb-messenger-1.8.my/qc-memory.c 2010-04-12 15:58:26.000000000 +0000
171 @@ -27,7 +27,7 @@
173 /* }}} */
174 /* {{{ [fold] Includes */
175 -#include <linux/autoconf.h>
176 +#include <generated/autoconf.h>
177 #include <linux/version.h>
179 #ifdef CONFIG_SMP
180 @@ -81,12 +81,14 @@
181 #define pte_offset(pmd,adr) pte_offset_map(pmd,adr) /* Emulation for a kernel using the new rmap-vm */
182 #endif /* Fix by Michele Balistreri <brain87@gmx.net> */
184 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
185 #ifndef SetPageReserved
186 #define SetPageReserved(p) mem_map_reserve(p)
187 #endif
188 #ifndef ClearPageReserved
189 #define ClearPageReserved(p) mem_map_unreserve(p)
190 #endif
191 +#endif
192 /* }}} */
194 /* {{{ [fold] kvirt_to_pa(): obtain physical address from virtual address obtained by vmalloc() */
195 Only in qc-usb-messenger-1.8.my: qc-memory.c.rej
196 Only in qc-usb-messenger-1.8.my: qc-memory.o
197 Only in qc-usb-messenger-1.8.my: .qc-memory.o.cmd
198 Only in qc-usb-messenger-1.8.my: qcmessenger.ko
199 Only in qc-usb-messenger-1.8.my: .qcmessenger.ko.cmd
200 Only in qc-usb-messenger-1.8.my: qcmessenger.mod.c
201 Only in qc-usb-messenger-1.8.my: qcmessenger.mod.o
202 Only in qc-usb-messenger-1.8.my: .qcmessenger.mod.o.cmd
203 Only in qc-usb-messenger-1.8.my: qcmessenger.o
204 Only in qc-usb-messenger-1.8.my: .qcmessenger.o.cmd
205 Only in qc-usb-messenger-1.8.my: qcset
206 Only in qc-usb-messenger-1.8.my: qc-vv6450.o
207 Only in qc-usb-messenger-1.8.my: .qc-vv6450.o.cmd
208 diff -wbBur qc-usb-messenger-1.8/quickcam.h qc-usb-messenger-1.8.my/quickcam.h
209 --- qc-usb-messenger-1.8/quickcam.h 2008-05-27 06:53:17.000000000 +0000
210 +++ qc-usb-messenger-1.8.my/quickcam.h 2010-04-12 15:58:33.000000000 +0000
211 @@ -92,7 +92,7 @@
213 #include <linux/version.h>
214 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
215 -#include <linux/autoconf.h>
216 +#include <generated/autoconf.h>
217 #else
218 #include <linux/config.h>
219 #endif
220 @@ -242,7 +242,7 @@
221 #if LINUX_VERSION_CODE<KERNEL_VERSION(2,4,20) || LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,0)
222 /* Things come and go... */
223 /* Used only for debugging, so this could be actually removed if needed */
224 -#define sem_getcount(sem) atomic_read(&(sem)->count)
225 +#define sem_getcount(sem) 0
226 #endif
228 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
229 Only in qc-usb-messenger-1.8.my: quickcam.h.rej
230 diff -wbBur qc-usb-messenger-1.8/quickcam.sh qc-usb-messenger-1.8.my/quickcam.sh
231 --- qc-usb-messenger-1.8/quickcam.sh 2008-05-27 06:53:16.000000000 +0000
232 +++ qc-usb-messenger-1.8.my/quickcam.sh 2010-04-12 15:58:18.000000000 +0000
233 @@ -374,7 +374,7 @@
234 echo "[!] Can not find version.h in kernel source."
235 KERNELOK="n"
237 -if [ ! -r "$KERNEL_SOURCE/include/linux/autoconf.h" ]; then
238 +if [ ! -r "$KERNEL_SOURCE/include/generated/autoconf.h" ]; then
239 echo "[!] Kernel source is not configured properly."
240 KERNELOK="n"
242 @@ -414,7 +414,7 @@
243 echo "[!] Can still not find version.h in kernel source."
244 KERNELOK="n"
246 - if [ ! -r "$KERNEL_SOURCE/include/linux/autoconf.h" ]; then
247 + if [ ! -r "$KERNEL_SOURCE/include/generated/autoconf.h" ]; then
248 echo "[!] Kernel source is still not configured properly."
249 KERNELOK="n"
251 Only in qc-usb-messenger-1.8.my: .tmp_versions