diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2018-10-10 10:04:18 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-11-06 13:11:59 +0100 |
commit | 4e26f692e2e2aa4d7d6ddb3c4d3dec17f45d6495 (patch) | |
tree | c9dbedd97968d032c387870c6eaf4fd055f341c6 /drivers/media | |
parent | media: ipu3-cio2: Unregister device nodes first, then release resources (diff) | |
download | linux-4e26f692e2e2aa4d7d6ddb3c4d3dec17f45d6495.tar.xz linux-4e26f692e2e2aa4d7d6ddb3c4d3dec17f45d6495.zip |
media: ipu3-cio2: Use cio2_queues_exit
The ipu3-cio2 driver has a function to tear down video devices as well as
the associated video buffer queues. Use it.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Bingbu Cao <bingbu.cao@intel.com>
Reviewed-by: Bingbu Cao <bingbu.cao@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/pci/intel/ipu3/ipu3-cio2.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers/media/pci/intel/ipu3/ipu3-cio2.c index 723022ef3662..447baaebca44 100644 --- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c +++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c @@ -1844,12 +1844,10 @@ fail_mutex_destroy: static void cio2_pci_remove(struct pci_dev *pci_dev) { struct cio2_device *cio2 = pci_get_drvdata(pci_dev); - unsigned int i; media_device_unregister(&cio2->media_dev); cio2_notifier_exit(cio2); - for (i = 0; i < CIO2_QUEUES; i++) - cio2_queue_exit(cio2, &cio2->queue[i]); + cio2_queues_exit(cio2); cio2_fbpt_exit_dummy(cio2); v4l2_device_unregister(&cio2->v4l2_dev); media_device_cleanup(&cio2->media_dev); |