summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/s5c73m3
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2017-01-05 13:34:07 +0100
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-01-31 10:56:49 +0100
commita2370ba2752538404e363346b339869c9973aeac (patch)
treebd1e82e1683ee6f424149a32b281d0ad6d42b6c2 /drivers/media/i2c/s5c73m3
parent[media] Add maintainers for camera on N900 (diff)
downloadlinux-a2370ba2752538404e363346b339869c9973aeac.tar.xz
linux-a2370ba2752538404e363346b339869c9973aeac.zip
[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/s5c73m3')
-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;
}