diff options
Diffstat (limited to 'drivers/media/pci/saa7164/saa7164-core.c')
-rw-r--r-- | drivers/media/pci/saa7164/saa7164-core.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/pci/saa7164/saa7164-core.c b/drivers/media/pci/saa7164/saa7164-core.c index 7618fdae811e..5d27865784c5 100644 --- a/drivers/media/pci/saa7164/saa7164-core.c +++ b/drivers/media/pci/saa7164/saa7164-core.c @@ -1196,6 +1196,11 @@ static int saa7164_initdev(struct pci_dev *pci_dev, if (NULL == dev) return -ENOMEM; + if (v4l2_device_register(&pci_dev->dev, &dev->v4l2_dev)) { + dev_err(&pci_dev->dev, "v4l2_device_register failed\n"); + goto fail_free; + } + /* pci init */ dev->pci = pci_dev; if (pci_enable_device(pci_dev)) { @@ -1367,6 +1372,7 @@ fail_fw: fail_irq: saa7164_dev_unregister(dev); fail_free: + v4l2_device_unregister(&dev->v4l2_dev); kfree(dev); return err; } @@ -1439,6 +1445,7 @@ static void saa7164_finidev(struct pci_dev *pci_dev) mutex_unlock(&devlist); saa7164_dev_unregister(dev); + v4l2_device_unregister(&dev->v4l2_dev); kfree(dev); } |