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);
10 urb->complete = qc_i2c_handler;
12 #if (LINUX_VERSION_CODE<KERNEL_VERSION(2,6,9) && !defined(CONFIG_SUSE_KERNEL)) || LINUX_VERSION_CODE<KERNEL_VERSION(2,6,8)
14 static struct video_device qc_v4l_template = {
16 type: VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE,
17 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
18 hardware: VID_HARDWARE_QCAM_USB,
21 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
22 release: qc_v4l_release,
28 #if LINUX_VERSION_CODE>=KERNEL_VERSION(2,5,3) || defined(pte_offset_map)
30 #define pte_offset(pmd,adr) pte_offset_map(pmd,adr) /* Emulation for a kernel using the new rmap-vm */
32 #endif /* Fix by Michele Balistreri <brain87@gmx.net> */
35 #ifndef SetPageReserved
36 #define SetPageReserved(p) mem_map_reserve(p)
38 #ifndef ClearPageReserved
39 #define ClearPageReserved(p) mem_map_unreserve(p)
41 +#endif /* SETPAGEFLAG */
44 /* {{{ [fold] kvirt_to_pa(): obtain physical address from virtual address obtained by vmalloc() */