d0b8687d3026a8b7b51657c4e9ac0c34036403dd
[openwrt-10.03/.git] / package / qc-usb / patches / 001-linux_2_6.patch
1 diff -ruN qc-usb-0.6.6-orig/qc-driver.c qc-usb-0.6.6/qc-driver.c
2 --- qc-usb-0.6.6-orig/qc-driver.c       2006-10-24 04:06:19.000000000 +0200
3 +++ qc-usb-0.6.6/qc-driver.c    2008-04-12 18:01:01.000000000 +0200
4 @@ -821,7 +821,9 @@
5         if (!cr) goto fail2;
6         urb->transfer_buffer = kmalloc(qc_i2c_maxbufsize*sizeof(u8), GFP_KERNEL);       /* Allocate maximum ever needed */
7         if (!urb->transfer_buffer) goto fail3;
8 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
9         spin_lock_init(&urb->lock);
10 +#endif
11         urb->complete = qc_i2c_handler;
12         urb->context  = qc;
13  #if (LINUX_VERSION_CODE<KERNEL_VERSION(2,6,9) && !defined(CONFIG_SUSE_KERNEL)) || LINUX_VERSION_CODE<KERNEL_VERSION(2,6,8)
14 @@ -3006,7 +3008,9 @@
15  static struct video_device qc_v4l_template = {
16         name:           "QuickCam USB",
17         type:           VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE,
18 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
19         hardware:       VID_HARDWARE_QCAM_USB,
20 +#endif
21         minor:          -1,
22  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
23         release:        qc_v4l_release,