1 |
eva 08/10/23 21:39:05 |
2 |
|
3 |
Added: qc-usb-0.6.6-kcompat-2.6.26.patch |
4 |
qc-usb-0.6.6-kcompat-2.6.27.patch |
5 |
Log: |
6 |
Include patch for 2.6.26 and 2.6.27 compatibility, bug #232390. Kudos to ubuntu and debian folks for still tracking this issues. |
7 |
(Portage version: 2.2_rc12/cvs/Linux 2.6.27-gentoo i686) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 media-video/qc-usb/files/qc-usb-0.6.6-kcompat-2.6.26.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/qc-usb/files/qc-usb-0.6.6-kcompat-2.6.26.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/qc-usb/files/qc-usb-0.6.6-kcompat-2.6.26.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: qc-usb-0.6.6-kcompat-2.6.26.patch |
16 |
=================================================================== |
17 |
From kernel 2.6.26rc2, SetPageReserved and ClearPageReserved changed from |
18 |
macros to inline functions, that are generated using macros (among which |
19 |
SETPAGEFLAG). |
20 |
|
21 |
The functions were redefined because they don't exist as macros, and then |
22 |
preventing compilation. |
23 |
|
24 |
This patch allows to compile the quickcam/qce-ga/qc-usb module on kernels |
25 |
2.6.26rc2 and later. |
26 |
|
27 |
An other fix could use #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26). |
28 |
|
29 |
Signed-off-by: Guillaume Bedot <littletux@××××××××.org> |
30 |
--- qc-usb-0.6.6.orig/qc-memory.c 2008-05-27 16:41:19.000000000 +0200 |
31 |
+++ qc-usb-0.6.6/qc-memory.c 2008-05-27 16:41:35.000000000 +0200 |
32 |
@@ -81,12 +81,14 @@ |
33 |
#define pte_offset(pmd,adr) pte_offset_map(pmd,adr) /* Emulation for a kernel using the new rmap-vm */ |
34 |
#endif /* Fix by Michele Balistreri <brain87@×××.net> */ |
35 |
|
36 |
+#ifndef SETPAGEFLAG |
37 |
#ifndef SetPageReserved |
38 |
#define SetPageReserved(p) mem_map_reserve(p) |
39 |
#endif |
40 |
#ifndef ClearPageReserved |
41 |
#define ClearPageReserved(p) mem_map_unreserve(p) |
42 |
#endif |
43 |
+#endif |
44 |
/* }}} */ |
45 |
|
46 |
/* {{{ [fold] kvirt_to_pa(): obtain physical address from virtual address obtained by vmalloc() */ |
47 |
|
48 |
|
49 |
|
50 |
1.1 media-video/qc-usb/files/qc-usb-0.6.6-kcompat-2.6.27.patch |
51 |
|
52 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/qc-usb/files/qc-usb-0.6.6-kcompat-2.6.27.patch?rev=1.1&view=markup |
53 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/qc-usb/files/qc-usb-0.6.6-kcompat-2.6.27.patch?rev=1.1&content-type=text/plain |
54 |
|
55 |
Index: qc-usb-0.6.6-kcompat-2.6.27.patch |
56 |
=================================================================== |
57 |
--- |
58 |
Patch inspired bug [1] |
59 |
|
60 |
[1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/268134 |
61 |
--- a/qc-driver.c 2008-10-23 22:55:48.000000000 +0200 |
62 |
+++ b/qc-driver.c 2008-10-23 22:56:53.000000000 +0200 |
63 |
@@ -2528,7 +2528,7 @@ |
64 |
if (qcdebug&QC_DEBUGUSER) PDEBUG("VIDIOCGCAP"); |
65 |
memset(&b, 0, sizeof(b)); |
66 |
strcpy(b.name, "Logitech QuickCam USB"); /* Max 31 characters */ |
67 |
- b.type = qc->vdev.type; |
68 |
+ b.type = VID_TYPE_CAPTURE; |
69 |
b.channels = 1; |
70 |
b.audios = 0; |
71 |
b.maxwidth = qc->sensor_data.maxwidth; |
72 |
@@ -3007,7 +3007,9 @@ |
73 |
|
74 |
static struct video_device qc_v4l_template = { |
75 |
name: "QuickCam USB", |
76 |
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) |
77 |
type: VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE, |
78 |
+#endif |
79 |
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) |
80 |
hardware: VID_HARDWARE_QCAM_USB, |
81 |
#endif |