On Wed, Jun 20, 2018 at 01:01:00PM +0200, Sebastian Andrzej Siewior wrote: > 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. The reason I didn't use usb_fill_int_urb() is that is not an interrupt urb, it's a iso urb. I'm not sure what affect the interval handling in usb_fill_int_urb() will have on this. Sean > > 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