Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 964e9e12 authored by Sakari Ailus's avatar Sakari Ailus Committed by Greg Kroah-Hartman
Browse files

media: ipu3-cio2: Fix PM runtime usage_count in driver unbind



commit 909d3096ac99fa2289f9b8945a3eab2269947a0a upstream.

Get the PM runtime usage_count and forbid PM runtime at driver unbind. The
opposite is being done in probe() already.

Fixes: commit c2a6a07a ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver")
Cc: stable@vger.kernel.org # for >= 4.16
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: default avatarBingbu Cao <bingbu.cao@intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 58c0d0b2
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -1871,6 +1871,9 @@ static void cio2_pci_remove(struct pci_dev *pci_dev)
	v4l2_device_unregister(&cio2->v4l2_dev);
	v4l2_device_unregister(&cio2->v4l2_dev);
	media_device_cleanup(&cio2->media_dev);
	media_device_cleanup(&cio2->media_dev);
	mutex_destroy(&cio2->lock);
	mutex_destroy(&cio2->lock);

	pm_runtime_forbid(&pci_dev->dev);
	pm_runtime_get_noresume(&pci_dev->dev);
}
}


static int __maybe_unused cio2_runtime_suspend(struct device *dev)
static int __maybe_unused cio2_runtime_suspend(struct device *dev)