updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / qc-usb / qc-usb-0.6.6-kcompat-2.6.26.patch
bloba3863372894f862d26a290315f45b40fdf081e86
1 From kernel 2.6.26rc2, SetPageReserved and ClearPageReserved changed from
2 macros to inline functions, that are generated using macros (among which
3 SETPAGEFLAG).
5 The functions were redefined because they don't exist as macros, and then
6 preventing compilation.
8 This patch allows to compile the quickcam/qce-ga/qc-usb module on kernels
9 2.6.26rc2 and later.
11 An other fix could use #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26).
13 Signed-off-by: Guillaume Bedot <littletux@mandriva.org>
14 --- qc-usb-0.6.6.orig/qc-memory.c 2008-05-27 16:41:19.000000000 +0200
15 +++ qc-usb-0.6.6/qc-memory.c 2008-05-27 16:41:35.000000000 +0200
16 @@ -81,12 +81,14 @@
17 #define pte_offset(pmd,adr) pte_offset_map(pmd,adr) /* Emulation for a kernel using the new rmap-vm */
18 #endif /* Fix by Michele Balistreri <brain87@gmx.net> */
20 +#ifndef SETPAGEFLAG
21 #ifndef SetPageReserved
22 #define SetPageReserved(p) mem_map_reserve(p)
23 #endif
24 #ifndef ClearPageReserved
25 #define ClearPageReserved(p) mem_map_unreserve(p)
26 #endif
27 +#endif
28 /* }}} */
30 /* {{{ [fold] kvirt_to_pa(): obtain physical address from virtual address obtained by vmalloc() */