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

Commit 614c2c9d authored by Meera Gande's avatar Meera Gande Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: reset atomic variable



Qos_request object is protected with an
atomic variable as its used between two drivers.
Made changes to reset the atomic variable
at destroy..

Change-Id: I65e03ea6f556b4518927c1dd077dff4db1158c8b
Signed-off-by: default avatarMeera Gande <mgande@codeaurora.org>
parent 1b3e464d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2018,2020 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
@@ -236,6 +236,8 @@ static inline void msm_pm_qos_add_request(void)
static void msm_pm_qos_remove_request(void)
{
	pr_info("%s: remove request", __func__);
	if (!atomic_cmpxchg(&qos_add_request_done, 1, 0))
		return;
	pm_qos_remove_request(&msm_v4l2_pm_qos_request);
}