[media] em28xx: create a common function for isoc and bulk URB allocation and setup
Rename the existing function for isoc transfers em28xx_init_isoc
to em28xx_init_usb_xfer and extend it.
URB allocation and setup is now done depending on the USB
transfer type, which is selected with a new function parameter.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
index e474ccf..bfce34d 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -3322,10 +3322,10 @@
if (has_dvb) {
/* pre-allocate DVB isoc transfer buffers */
- retval = em28xx_alloc_isoc(dev, EM28XX_DIGITAL_MODE,
- EM28XX_DVB_NUM_ISOC_PACKETS,
+ retval = em28xx_alloc_urbs(dev, EM28XX_DIGITAL_MODE, 0,
EM28XX_DVB_NUM_BUFS,
- dev->dvb_max_pkt_size);
+ dev->dvb_max_pkt_size,
+ EM28XX_DVB_NUM_ISOC_PACKETS);
if (retval) {
goto unlock_and_free;
}