summaryrefslogtreecommitdiff
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2017-01-05 10:34:07 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-01-31 07:56:49 -0200
commita2370ba2752538404e363346b339869c9973aeac (patch)
treebd1e82e1683ee6f424149a32b281d0ad6d42b6c2 /drivers/media/i2c
parent21b5a1c33e11bf5a6284ff4fcf42fcc5473b83a4 (diff)
[media] v4l: s5c73m3: fix negation operator
Bool values should be negated using logical operators. Using bitwise operators results in unexpected and possibly incorrect results. Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c b/drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c
index 0a060339e516..2e7185030741 100644
--- a/drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c
+++ b/drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c
@@ -211,7 +211,7 @@ static int s5c73m3_3a_lock(struct s5c73m3 *state, struct v4l2_ctrl *ctrl)
}
if ((ctrl->val ^ ctrl->cur.val) & V4L2_LOCK_FOCUS)
- ret = s5c73m3_af_run(state, ~af_lock);
+ ret = s5c73m3_af_run(state, !af_lock);
return ret;
}