diff mbox

[09/27] media: em28xx-audio: use usb_fill_int_urb()

Message ID 20180620110105.19955-10-bigeasy@linutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Sebastian Andrzej Siewior June 20, 2018, 11 a.m. UTC
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: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/media/usb/em28xx/em28xx-audio.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
diff mbox

Patch

diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c
index 7f75002927a1..4251c9f8e07a 100644
--- a/drivers/media/usb/em28xx/em28xx-audio.c
+++ b/drivers/media/usb/em28xx/em28xx-audio.c
@@ -877,15 +877,13 @@  static int em28xx_audio_urb_init(struct em28xx *dev)
 		}
 		dev->adev.transfer_buffer[i] = buf;
 
-		urb->dev = udev;
-		urb->context = dev;
-		urb->pipe = usb_rcvisocpipe(udev, EM28XX_EP_AUDIO);
+		usb_fill_int_urb(urb, udev,
+				 usb_rcvisocpipe(udev, EM28XX_EP_AUDIO),
+				 buf, ep_size * npackets, em28xx_audio_isocirq,
+				 dev, ep->bInterval);
+
 		urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP;
-		urb->transfer_buffer = buf;
-		urb->interval = interval;
-		urb->complete = em28xx_audio_isocirq;
 		urb->number_of_packets = npackets;
-		urb->transfer_buffer_length = ep_size * npackets;
 
 		for (j = k = 0; j < npackets; j++, k += ep_size) {
 			urb->iso_frame_desc[j].offset = k;