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

Commit f571beb3 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: Prevent camera suspend while active"

parents 2973953c edbeafdf
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -537,6 +537,7 @@ static int camera_v4l2_open(struct file *filep)
		goto vb2_q_fail;

	if (!atomic_read(&pvdev->opened)) {
		pm_stay_awake(&pvdev->vdev->dev);

		/* create a new session when first opened */
		rc = msm_create_session(pvdev->vdev->num, pvdev->vdev);
@@ -570,6 +571,7 @@ post_fail:
command_ack_q_fail:
	msm_destroy_session(pvdev->vdev->num);
session_fail:
	pm_relax(&pvdev->vdev->dev);
	camera_v4l2_vb2_q_release(filep);
vb2_q_fail:
	camera_v4l2_fh_release(filep);
@@ -619,6 +621,7 @@ static int camera_v4l2_close(struct file *filep)
		/* This should take care of both normal close
		 * and application crashes */
		msm_destroy_session(pvdev->vdev->num);
		pm_relax(&pvdev->vdev->dev);
		atomic_set(&pvdev->stream_cnt, 0);

	} else {
@@ -721,6 +724,7 @@ int camera_init_v4l2(struct device *dev, unsigned int *session)
	atomic_set(&pvdev->opened, 0);
	atomic_set(&pvdev->stream_cnt, 0);
	video_set_drvdata(pvdev->vdev, pvdev);
	device_init_wakeup(&pvdev->vdev->dev, 1);
	goto init_end;

video_register_fail:
+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
#include <linux/i2c.h>
#include <linux/videodev2.h>
#include <linux/pm_qos.h>
#include <linux/wakelock.h>
#include <linux/msm_ion.h>
#include <linux/iommu.h>
#include <media/v4l2-dev.h>