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