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: Sean Young <sean@xxxxxxxx> Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> --- drivers/media/rc/ttusbir.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/media/rc/ttusbir.c b/drivers/media/rc/ttusbir.c index aafea3c5170b..6a7c9b50ff5a 100644 --- a/drivers/media/rc/ttusbir.c +++ b/drivers/media/rc/ttusbir.c @@ -257,10 +257,6 @@ static int ttusbir_probe(struct usb_interface *intf, goto out; } - urb->dev = tt->udev; - urb->context = tt; - urb->pipe = usb_rcvisocpipe(tt->udev, tt->iso_in_endp); - urb->interval = 1; buffer = usb_alloc_coherent(tt->udev, 128, GFP_KERNEL, &urb->transfer_dma); if (!buffer) { @@ -268,11 +264,11 @@ static int ttusbir_probe(struct usb_interface *intf, ret = -ENOMEM; goto out; } + usb_fill_int_urb(urb, tt->udev, + usb_rcvisocpipe(tt->udev, tt->iso_in_endp), + buffer, 128, ttusbir_urb_complete, tt, 1); urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP | URB_ISO_ASAP; - urb->transfer_buffer = buffer; - urb->complete = ttusbir_urb_complete; urb->number_of_packets = 8; - urb->transfer_buffer_length = 128; for (j = 0; j < 8; j++) { urb->iso_frame_desc[j].offset = j * 16; -- 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