From 2cd4fd1e57cb6897612ead8a3d39ecb444920a1a Mon Sep 17 00:00:00 2001 From: Michel Ludwig Date: Sun, 17 Jun 2007 17:12:32 -0300 Subject: [PATCH] V4L/DVB (12775): tm6000: fix usb_submit_urb to be called inside interrupt context Signed-off-by: Michel Ludwig Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/tm6000/tm6000-cards.c | 8 ++++++-- drivers/staging/tm6000/tm6000-video.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index da2348e1c048..df973c0cc46a 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -229,11 +229,15 @@ static int tm6000_usb_probe(struct usb_interface *interface, /* Increment usage count */ tm6000_devused|=1<name, 29, "tm6000 #%d", nr); + + dev->model=id->driver_info; + if ((card[nr]>=0) && (card[nr]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) { diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 68002a14ef3d..5697be06ddd7 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -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); -- 2.30.2