move qc-usb from trunk to packages as well (see [12260])
[openwrt/svn-archive/archive.git] / multimedia / qc-usb / patches / 001-linux_2_6.patch
1 --- a/qc-driver.c
2 +++ b/qc-driver.c
3 @@ -821,7 +821,9 @@
4 if (!cr) goto fail2;
5 urb->transfer_buffer = kmalloc(qc_i2c_maxbufsize*sizeof(u8), GFP_KERNEL); /* Allocate maximum ever needed */
6 if (!urb->transfer_buffer) goto fail3;
7 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
8 spin_lock_init(&urb->lock);
9 +#endif
10 urb->complete = qc_i2c_handler;
11 urb->context = qc;
12 #if (LINUX_VERSION_CODE<KERNEL_VERSION(2,6,9) && !defined(CONFIG_SUSE_KERNEL)) || LINUX_VERSION_CODE<KERNEL_VERSION(2,6,8)
13 @@ -3006,7 +3008,9 @@
14 static struct video_device qc_v4l_template = {
15 name: "QuickCam USB",
16 type: VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE,
17 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
18 hardware: VID_HARDWARE_QCAM_USB,
19 +#endif
20 minor: -1,
21 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
22 release: qc_v4l_release,
23 --- a/qc-memory.c
24 +++ b/qc-memory.c
25 @@ -78,15 +78,19 @@
26 #endif
27
28 #if LINUX_VERSION_CODE>=KERNEL_VERSION(2,5,3) || defined(pte_offset_map)
29 +#ifndef pte_offset
30 #define pte_offset(pmd,adr) pte_offset_map(pmd,adr) /* Emulation for a kernel using the new rmap-vm */
31 +#endif
32 #endif /* Fix by Michele Balistreri <brain87@gmx.net> */
33
34 +#ifndef SETPAGEFLAG
35 #ifndef SetPageReserved
36 #define SetPageReserved(p) mem_map_reserve(p)
37 #endif
38 #ifndef ClearPageReserved
39 #define ClearPageReserved(p) mem_map_unreserve(p)
40 #endif
41 +#endif /* SETPAGEFLAG */
42 /* }}} */
43
44 /* {{{ [fold] kvirt_to_pa(): obtain physical address from virtual address obtained by vmalloc() */