upstream: [media] em28xx: fix usb alternate setting for analog and digital video...
authorFrank Schaefer <fschaefer.oss@googlemail.com>
Mon, 13 Jan 2014 22:02:06 +0000 (19:02 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:54:31 +0000 (11:54 +0900)
commit0223c06a283920923f1fdd11733c02982ebf56a6
tree673d1f89ebfc7683a70b446c58f87aca11a65b82
parente0fe5492f052955e518f76fad776acc5aec1a5a5
upstream: [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>
drivers/media/usb/em28xx/em28xx-audio.c
drivers/media/usb/em28xx/em28xx-cards.c
drivers/media/usb/em28xx/em28xx-dvb.c
drivers/media/usb/em28xx/em28xx-video.c
drivers/media/usb/em28xx/em28xx.h