]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit83b4468df3815fa5724e26fa118f017674f8e4ac
treea45b0a691d7f29547cf26f8675db356f86499194
parentf8df588ef97044f10fb7083445e2a1367fbe291b
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 7d803d2a6633 ("V4L/DVB (6585): Convert
em28xx to video_ioctl2") this was not implemented right.

Fixes: 7d803d2a6633 ("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