Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: staging/ipu7: fix isys device runtime PM usage in firmware closing

The PM usage counter of isys was bumped up when start camera stream
(opening firmware) but it was not dropped after stream stop(closing
firmware), it forbids system fail to suspend due to the wrong PM state
of ISYS. This patch drop the PM usage counter in firmware close to fix
it.

Cc: Stable@vger.kernel.org
Fixes: a516d36bdc3d ("media: staging/ipu7: add IPU7 input system device driver")
Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Bingbu Cao and committed by
Hans Verkuil
895d3b4b a5925a2c

+1
+1
drivers/staging/media/ipu7/ipu7-isys-video.c
··· 917 917 ipu7_fw_isys_close(isys); 918 918 919 919 mutex_unlock(&isys->mutex); 920 + pm_runtime_put(&isys->adev->auxdev.dev); 920 921 } 921 922 922 923 int ipu7_isys_setup_video(struct ipu7_isys_video *av,