mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-24 23:19:31 -05:00
37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
From 42a98c44669d92dafcf4d6336bdccaeb2db12786 Mon Sep 17 00:00:00 2001
|
|
From: Sureshnaidu Laveti <lsuresh@codeaurora.org>
|
|
Date: Mon, 3 Oct 2016 04:01:32 -0700
|
|
Subject: msm: sensor: Adding mutex for actuator power down operations
|
|
|
|
Protecting operations performed during actuator powerdown
|
|
from race condition by adding mutex.
|
|
CRs-Fixed: 1071891
|
|
|
|
Change-Id: I7d6b2e8878788615c02678a4a28d31dca0ed6bca
|
|
Signed-off-by: Sureshnaidu Laveti <lsuresh@codeaurora.org>
|
|
---
|
|
drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c b/drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c
|
|
index bf39738..a700f83 100644
|
|
--- a/drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c
|
|
+++ b/drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c
|
|
@@ -1559,11 +1559,13 @@ static long msm_actuator_subdev_ioctl(struct v4l2_subdev *sd,
|
|
pr_err("a_ctrl->i2c_client.i2c_func_tbl NULL\n");
|
|
return -EINVAL;
|
|
}
|
|
+ mutex_lock(a_ctrl->actuator_mutex);
|
|
rc = msm_actuator_power_down(a_ctrl);
|
|
if (rc < 0) {
|
|
pr_err("%s:%d Actuator Power down failed\n",
|
|
__func__, __LINE__);
|
|
}
|
|
+ mutex_unlock(a_ctrl->actuator_mutex);
|
|
return msm_actuator_close(sd, NULL);
|
|
default:
|
|
return -ENOIOCTLCMD;
|
|
--
|
|
cgit v1.1
|
|
|