OSDN Git Service

media: em28xx: fix handler for vidioc_s_input()
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 14 Sep 2018 17:13:15 +0000 (13:13 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 17 Sep 2018 17:07:28 +0000 (13:07 -0400)
commit258c430456ba5f0005043762e14fc3be35983aaf
treea45b0a691d7f29547cf26f8675db356f86499194
parent5c4c4505b716cb782ad7263091edc466c4d1fbd4
media: em28xx: fix handler for vidioc_s_input()

The a->index is not the name of the internal amux entry,
but, instead a value from zero to the maximum number
of audio inputs.

As the actual available inputs depend on each board, build
it dynamically.

This is broken for a really long time. On a quick check,
since at least commit 195a4ef627e1 ("V4L/DVB (6585): Convert
em28xx to video_ioctl2") this was not implemented right.

Fixes: 195a4ef627e1 ("V4L/DVB (6585): Convert em28xx to video_ioctl2")

Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/usb/em28xx/em28xx-cards.c
drivers/media/usb/em28xx/em28xx-video.c
drivers/media/usb/em28xx/em28xx.h