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

Commit 8a550616 authored by Jeyaprakash Soundrapandian's avatar Jeyaprakash Soundrapandian Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: core: Destroy the context handle on shutdown" into dev/msm-4.9-camx

parents b4923827 0ec05e2b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ static int cam_context_handle_hw_event(void *context, uint32_t evt_id,
int cam_context_shutdown(struct cam_context *ctx)
{
	int rc = 0;
	int32_t ctx_hdl = ctx->dev_hdl;

	if (ctx->state_machine[ctx->state].ioctl_ops.stop_dev) {
		rc = ctx->state_machine[ctx->state].ioctl_ops.stop_dev(
@@ -54,6 +55,8 @@ int cam_context_shutdown(struct cam_context *ctx)
			CAM_ERR(CAM_CORE, "Error while dev release %d", rc);
	}

	if (!rc)
		cam_destroy_device_hdl(ctx_hdl);
	return rc;
}

+0 −1
Original line number Diff line number Diff line
@@ -381,7 +381,6 @@ int cam_node_shutdown(struct cam_node *node)
	for (i = 0; i < node->ctx_size; i++) {
		if (node->ctx_list[i].dev_hdl >= 0) {
			cam_context_shutdown(&(node->ctx_list[i]));
			cam_destroy_device_hdl(node->ctx_list[i].dev_hdl);
			cam_context_putref(&(node->ctx_list[i]));
		}
	}