]> git.pld-linux.org Git - packages/kernel.git/blob - linux-2.4.20-rc1-cpia_usb-USB.patch
- obsolete
[packages/kernel.git] / linux-2.4.20-rc1-cpia_usb-USB.patch
1 diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.19/drivers/media/video/cpia_usb.c linux-2.4.20/drivers/media/video/cpia_usb.c
2 --- linux-2.4.19/drivers/media/video/cpia_usb.c 2001-10-25 20:53:47.000000000 +0000
3 +++ linux-2.4.20/drivers/media/video/cpia_usb.c 2002-10-29 11:18:31.000000000 +0000
4 @@ -46,7 +46,7 @@
5  
6  struct cpia_sbuf {
7         char *data;
8 -       urb_t *urb;
9 +       struct urb *urb;
10  };
11  
12  #define FRAMEBUF_LEN (CPIA_MAX_FRAME_SIZE+100)
13 @@ -168,7 +168,7 @@
14  static int cpia_usb_open(void *privdata)
15  {
16         struct usb_cpia *ucpia = (struct usb_cpia *) privdata;
17 -       urb_t *urb;
18 +       struct urb *urb;
19         int ret, retval = 0, fx, err;
20    
21         if (!ucpia)
22 @@ -266,14 +266,16 @@
23  
24  error_urb1:            /* free urb 1 */
25         usb_free_urb(ucpia->sbuf[1].urb);
26 -
27 +       ucpia->sbuf[1].urb = NULL;
28  error_urb0:            /* free urb 0 */
29         usb_free_urb(ucpia->sbuf[0].urb);
30 -
31 +       ucpia->sbuf[0].urb = NULL;
32  error_1:
33         kfree (ucpia->sbuf[1].data);
34 +       ucpia->sbuf[1].data = NULL;
35  error_0:
36         kfree (ucpia->sbuf[0].data);
37 +       ucpia->sbuf[0].data = NULL;
38         
39         return retval;
40  }
41 @@ -620,8 +622,10 @@
42                 ucpia->buffers[0] = NULL;
43         }
44  
45 -       if (!ucpia->open)
46 +       if (!ucpia->open) {
47                 kfree(ucpia);
48 +               cam->lowlevel_data = NULL;
49 +       }
50  }
51  
52  static int __init usb_cpia_init(void)
This page took 0.04227 seconds and 3 git commands to generate.