diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-05-11 09:07:45 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-07-06 18:09:17 -0300 |
commit | 8c7cb12ac1cc4ecc318765e0e2dcd853fa4a4d62 (patch) | |
tree | 58c579cbffffc169bff4652fcb90f3616ef795bb /drivers/media/video/cx88/cx88-cards.c | |
parent | bac639818c2c720ea8f79f932601f9209579bf14 (diff) | |
download | linux-8c7cb12ac1cc4ecc318765e0e2dcd853fa4a4d62.tar.bz2 |
[media] cx88: each device node gets the right controls
radio only sees audio controls, video sees video and audio and vbi
sees none.
Also disable the chroma_agc control if secam is selected.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx88/cx88-cards.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-cards.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index cd8c3bf698ea..4e9d4f722960 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c @@ -3693,14 +3693,22 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr) return NULL; } - if (v4l2_ctrl_handler_init(&core->hdl, 13)) { + if (v4l2_ctrl_handler_init(&core->video_hdl, 13)) { + v4l2_device_unregister(&core->v4l2_dev); + kfree(core); + return NULL; + } + + if (v4l2_ctrl_handler_init(&core->audio_hdl, 13)) { + v4l2_ctrl_handler_free(&core->video_hdl); v4l2_device_unregister(&core->v4l2_dev); kfree(core); return NULL; } if (0 != cx88_get_resources(core, pci)) { - v4l2_ctrl_handler_free(&core->hdl); + v4l2_ctrl_handler_free(&core->video_hdl); + v4l2_ctrl_handler_free(&core->audio_hdl); v4l2_device_unregister(&core->v4l2_dev); kfree(core); return NULL; @@ -3715,7 +3723,8 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr) if (core->lmmio == NULL) { release_mem_region(pci_resource_start(pci, 0), pci_resource_len(pci, 0)); - v4l2_ctrl_handler_free(&core->hdl); + v4l2_ctrl_handler_free(&core->video_hdl); + v4l2_ctrl_handler_free(&core->audio_hdl); v4l2_device_unregister(&core->v4l2_dev); kfree(core); return NULL; |