From 9712baaea9096f4e45be8aeb691e9a651354d6aa Mon Sep 17 00:00:00 2001 From: Karthik Anantha Ram Date: Wed, 24 Jul 2019 10:12:08 -0700 Subject: [PATCH] msm: camera: reqmgr: Update log for shutdown Add warn log to indicate shutdown has occurred. Also decrement the open req count after successfully applying a request. Change-Id: I1b420dff52e016f52e19c5572824e4ed6f53744b Signed-off-by: Karthik Anantha Ram Signed-off-by: Mukund Madhusudan Atre --- drivers/cam_req_mgr/cam_req_mgr_core.c | 4 +--- drivers/cam_req_mgr/cam_req_mgr_dev.c | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/cam_req_mgr/cam_req_mgr_core.c b/drivers/cam_req_mgr/cam_req_mgr_core.c index 3147eeab0a7b..287db0c46d2f 100644 --- a/drivers/cam_req_mgr/cam_req_mgr_core.c +++ b/drivers/cam_req_mgr/cam_req_mgr_core.c @@ -625,9 +625,6 @@ static int __cam_req_mgr_send_req(struct cam_req_mgr_core_link *link, *failed_dev = dev; break; } - - if (pd == link->max_delay) - link->open_req_cnt--; } trace_cam_req_mgr_apply_request(link, &apply_req, dev); } @@ -1260,6 +1257,7 @@ static int __cam_req_mgr_process_req(struct cam_req_mgr_core_link *link, &idx, reset_step + 1, in_q->num_slots); __cam_req_mgr_reset_req_slot(link, idx); + link->open_req_cnt--; } } diff --git a/drivers/cam_req_mgr/cam_req_mgr_dev.c b/drivers/cam_req_mgr/cam_req_mgr_dev.c index 718942552bc7..a30dc69a80d0 100644 --- a/drivers/cam_req_mgr/cam_req_mgr_dev.c +++ b/drivers/cam_req_mgr/cam_req_mgr_dev.c @@ -151,6 +151,8 @@ static int cam_req_mgr_close(struct file *filep) struct v4l2_fh *vfh = filep->private_data; struct v4l2_subdev_fh *subdev_fh = to_v4l2_subdev_fh(vfh); + CAM_WARN(CAM_CRM, + "release invoked associated userspace process has died"); mutex_lock(&g_dev.cam_lock); if (g_dev.open_cnt <= 0) {