summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/cx25821/cx25821-video.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-04-14 11:07:02 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-15 08:35:21 -0300
commit31b320739b4318a04c203918310b49a55a598bde (patch)
treed54fe254a6d908e9f215052a734ea3e4c1381199 /drivers/media/pci/cx25821/cx25821-video.c
parenta877e2771a7f74b724cc09d96decd2ff3a37f2cd (diff)
downloadop-kernel-dev-31b320739b4318a04c203918310b49a55a598bde.zip
op-kernel-dev-31b320739b4318a04c203918310b49a55a598bde.tar.gz
[media] cx25821: the audio channel was registered as a video node
Skip the audio channel when registering the video nodes. This fixes a bug where that incorrectly registered 'video' node was never unregistered. Note: this bug only surfaces if the video output nodes are enabled again after the previous patch disabled them. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/pci/cx25821/cx25821-video.c')
-rw-r--r--drivers/media/pci/cx25821/cx25821-video.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/pci/cx25821/cx25821-video.c b/drivers/media/pci/cx25821/cx25821-video.c
index 6b18320..8bf9c89 100644
--- a/drivers/media/pci/cx25821/cx25821-video.c
+++ b/drivers/media/pci/cx25821/cx25821-video.c
@@ -462,6 +462,9 @@ int cx25821_video_register(struct cx25821_dev *dev)
spin_lock_init(&dev->slock);
for (i = 0; i < VID_CHANNEL_NUM; ++i) {
+ if (i == SRAM_CH08) /* audio channel */
+ continue;
+
cx25821_init_controls(dev, i);
cx25821_risc_stopper(dev->pci, &dev->channels[i].vidq.stopper,
@@ -788,7 +791,7 @@ static int video_open(struct file *file)
{
h = list_entry(list, struct cx25821_dev, devlist);
- for (i = 0; i < MAX_VID_CHANNEL_NUM; i++) {
+ for (i = 0; i < MAX_VID_CHANNEL_NUM - 1; i++) {
if (h->channels[i].video_dev &&
h->channels[i].video_dev->minor == minor) {
dev = h;
OpenPOWER on IntegriCloud