Using usb_fill_int_urb() helps to find code which initializes an URB. A grep for members of the struct (like ->complete) reveal lots of other things, too. Cc: Hans Verkuil <hverkuil@xxxxxxxxx> Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> --- drivers/media/usb/usbvision/usbvision-core.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/media/usb/usbvision/usbvision-core.c b/drivers/media/usb/usbvision/usbvision-core.c index 31e0e98d6daf..52f21ba2a368 100644 --- a/drivers/media/usb/usbvision/usbvision-core.c +++ b/drivers/media/usb/usbvision/usbvision-core.c @@ -2302,16 +2302,14 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision) sb_size, GFP_KERNEL, &urb->transfer_dma); - urb->dev = dev; - urb->context = usbvision; - urb->pipe = usb_rcvisocpipe(dev, usbvision->video_endp); + usb_fill_int_urb(urb, dev, + usb_rcvisocpipe(dev, usbvision->video_endp), + usbvision->sbuf[buf_idx].data, + usbvision->isoc_packet_size * USBVISION_URB_FRAMES, + usbvision_isoc_irq, usbvision, 1); + urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP; - urb->interval = 1; - urb->transfer_buffer = usbvision->sbuf[buf_idx].data; - urb->complete = usbvision_isoc_irq; urb->number_of_packets = USBVISION_URB_FRAMES; - urb->transfer_buffer_length = - usbvision->isoc_packet_size * USBVISION_URB_FRAMES; for (j = k = 0; j < USBVISION_URB_FRAMES; j++, k += usbvision->isoc_packet_size) { urb->iso_frame_desc[j].offset = k; -- 2.17.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html