summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88/cx88-cards.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-03-14 16:40:51 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-14 16:40:51 +0100
commit98067ab29acca0eafb57f28d72ae299eb41d6642 (patch)
tree399ed89c5e05ce87b92667178985135195129cc0 /linux/drivers/media/video/cx88/cx88-cards.c
parentc5b41e23cfa080a22b48bdf0e6e2a8028f340a70 (diff)
downloadmediapointer-dvb-s2-98067ab29acca0eafb57f28d72ae299eb41d6642.tar.gz
mediapointer-dvb-s2-98067ab29acca0eafb57f28d72ae299eb41d6642.tar.bz2
cx88: convert to v4l2_device.
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-cards.c')
-rw-r--r--linux/drivers/media/video/cx88/cx88-cards.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c
index b3d966ad5..719315d02 100644
--- a/linux/drivers/media/video/cx88/cx88-cards.c
+++ b/linux/drivers/media/video/cx88/cx88-cards.c
@@ -3171,7 +3171,15 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
core->nr = nr;
sprintf(core->name, "cx88[%d]", core->nr);
+
+ strcpy(core->v4l2_dev.name, core->name);
+ if (v4l2_device_register(NULL, &core->v4l2_dev)) {
+ kfree(core);
+ return NULL;
+ }
+
if (0 != cx88_get_resources(core, pci)) {
+ v4l2_device_unregister(&core->v4l2_dev);
kfree(core);
return NULL;
}