diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2017-01-13 08:07:55 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-01-13 08:07:55 -0800 |
commit | 22df2404734a4bd52393bbeeae12d69199ef270f (patch) | |
tree | 7de3d65981bd1dfb6c74c0ae86d063ba92d6434e | |
parent | 0b1feeb417ed74d4c0a44444b500013d50a2c61d (diff) | |
parent | 370a1f7e6699c8fbdb16afad7d45d73bd971e518 (diff) |
Merge "msm: camera: Add lock/unlock to "set mode" function"
-rw-r--r-- | drivers/media/platform/msm/camera_v2/common/msm_camera_tz_util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/platform/msm/camera_v2/common/msm_camera_tz_util.c b/drivers/media/platform/msm/camera_v2/common/msm_camera_tz_util.c index d0843fb3a32c..79231fb314ad 100644 --- a/drivers/media/platform/msm/camera_v2/common/msm_camera_tz_util.c +++ b/drivers/media/platform/msm/camera_v2/common/msm_camera_tz_util.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -295,6 +295,7 @@ int32_t msm_camera_tz_ta_set_mode(uint32_t mode, cmd_len = sizeof(struct msm_camera_tz_set_mode_req_t); rsp_len = sizeof(struct msm_camera_tz_set_mode_rsp_t); + msm_camera_tz_lock(); rc = get_cmd_rsp_buffers(ta_qseecom_handle, (void **)&cmd, &cmd_len, (void **)&rsp, &rsp_len); if (!rc) { @@ -309,10 +310,12 @@ int32_t msm_camera_tz_ta_set_mode(uint32_t mode, pr_err("%s:%d - Failed: rc=%d\n", __func__, __LINE__, rc); + msm_camera_tz_unlock(); return rc; } rc = rsp->rc; } + msm_camera_tz_unlock(); CDBG("Done: rc=%d, Mode=0x%08X - %lluus\n", rc, mode, ktime_us_delta(ktime_get(), startTime)); |