V4L/DVB (12775): tm6000: fix usb_submit_urb to be called inside interrupt context
authorMichel Ludwig <michel.ludwig@gmail.com>
Sun, 17 Jun 2007 20:12:32 +0000 (17:12 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 18 May 2010 03:39:28 +0000 (00:39 -0300)
Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/tm6000/tm6000-cards.c
drivers/staging/tm6000/tm6000-video.c

index da2348e1c048cebc80269a3e0a9b01287f66290e..df973c0cc46aa644284faa3a31070278c43b6323 100644 (file)
@@ -229,11 +229,15 @@ static int tm6000_usb_probe(struct usb_interface *interface,
 
        /* Increment usage count */
        tm6000_devused|=1<<nr;
+       snprintf(dev->name, 29, "tm6000 #%d", nr);
+
+       dev->model=id->driver_info;
+       if ((card[nr]>=0) && (card[nr]<ARRAY_SIZE(tm6000_boards))) {
+               dev->model=card[nr];
+       }
 
        INIT_LIST_HEAD(&dev->tm6000_corelist);
        dev->udev= usbdev;
-       dev->model=id->driver_info;
-       snprintf(dev->name, 29, "tm6000 #%d", nr);
        dev->devno=nr;
 
        switch (usbdev->speed) {
index 68002a14ef3dec49eb449647c061cff7494ec13c..5697be06ddd72f0bf6381b1022360b55e36f9545 100644 (file)
@@ -591,7 +591,7 @@ static int tm6000_start_thread( struct tm6000_dmaqueue  *dma_q,
 
        /* submit urbs and enables IRQ */
        for (i = 0; i < dev->isoc_ctl.num_bufs; i++) {
-               rc = usb_submit_urb(dev->isoc_ctl.urb[i], GFP_KERNEL);
+               rc = usb_submit_urb(dev->isoc_ctl.urb[i], GFP_ATOMIC);
                if (rc) {
                        tm6000_err("submit of urb %i failed (error=%i)\n", i,
                                   rc);