summaryrefslogtreecommitdiff
path: root/drivers/media/usb/em28xx/em28xx-dvb.c
diff options
context:
space:
mode:
authorFrank Schaefer <fschaefer.oss@googlemail.com>2014-01-13 19:02:06 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-14 19:24:38 -0200
commit961717b41bc1103dcd30d293fd689a614fbfa90c (patch)
treefdff0e05b3a227f1454d6550de6607373b169311 /drivers/media/usb/em28xx/em28xx-dvb.c
parent8068eb885a13e33244a8692c880eca478b467d9d (diff)
downloadlinux-961717b41bc1103dcd30d293fd689a614fbfa90c.tar.gz
linux-961717b41bc1103dcd30d293fd689a614fbfa90c.tar.xz
[media] em28xx: fix usb alternate setting for analog and digital video endpoints > 0
The current code assumes that the analog + digital video endpoints are always at interface number 0 when changing the alternate setting. This seems to work fine for most existing devices. However, at least the SpeedLink VAD Laplace webcam has the video endpoint on interface number 3 (which fortunately doesn't cause any trouble because ist uses bulk transfers only). We already consider the actual interface number for audio endpoints, so rename the the audio_ifnum variable and use it for all device types. Also get get rid of a pointless (ifnum < 0) in em28xx-audio. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-dvb.c')
-rw-r--r--drivers/media/usb/em28xx/em28xx-dvb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
index 881a813836eb..a0a669e81362 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -203,7 +203,7 @@ static int em28xx_start_streaming(struct em28xx_dvb *dvb)
dvb_alt = dev->dvb_alt_isoc;
}
- usb_set_interface(dev->udev, 0, dvb_alt);
+ usb_set_interface(dev->udev, dev->ifnum, dvb_alt);
rc = em28xx_set_mode(dev, EM28XX_DIGITAL_MODE);
if (rc < 0)
return rc;