diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-04-14 14:07:02 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-15 11:35:21 (GMT) |
commit | 31b320739b4318a04c203918310b49a55a598bde (patch) | |
tree | d54fe254a6d908e9f215052a734ea3e4c1381199 /drivers/media/pci/cx25821/cx25821-core.c | |
parent | a877e2771a7f74b724cc09d96decd2ff3a37f2cd (diff) | |
download | linux-fsl-qoriq-31b320739b4318a04c203918310b49a55a598bde.tar.xz |
[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-core.c')
-rw-r--r-- | drivers/media/pci/cx25821/cx25821-core.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/media/pci/cx25821/cx25821-core.c b/drivers/media/pci/cx25821/cx25821-core.c index 1884e2c..1f47422 100644 --- a/drivers/media/pci/cx25821/cx25821-core.c +++ b/drivers/media/pci/cx25821/cx25821-core.c @@ -1051,11 +1051,9 @@ void cx25821_dev_unregister(struct cx25821_dev *dev) if (!atomic_dec_and_test(&dev->refcount)) return; - for (i = 0; i < VID_CHANNEL_NUM; i++) - cx25821_video_unregister(dev, i); - - for (i = VID_UPSTREAM_SRAM_CHANNEL_I; - i <= AUDIO_UPSTREAM_SRAM_CHANNEL_B; i++) { + for (i = 0; i < MAX_VID_CHANNEL_NUM - 1; i++) { + if (i == SRAM_CH08) /* audio channel */ + continue; cx25821_video_unregister(dev, i); } |