Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] s3c-camif: fix compiler warnings

Fix these compiler warnings that appeared after switching to gcc-5.1.0:

drivers/media/platform/s3c-camif/camif-capture.c: In function 'sensor_set_power':
drivers/media/platform/s3c-camif/camif-capture.c:118:10: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
if (!on == camif->sensor.power_count)
^
drivers/media/platform/s3c-camif/camif-capture.c: In function 'sensor_set_streaming':
drivers/media/platform/s3c-camif/camif-capture.c:134:10: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
if (!on == camif->sensor.stream_count)
^

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
7e0d4e92 874c65f0

+2 -2
+2 -2
drivers/media/platform/s3c-camif/camif-capture.c
··· 115 115 struct cam_sensor *sensor = &camif->sensor; 116 116 int err = 0; 117 117 118 - if (!on == camif->sensor.power_count) 118 + if (camif->sensor.power_count == !on) 119 119 err = v4l2_subdev_call(sensor->sd, core, s_power, on); 120 120 if (!err) 121 121 sensor->power_count += on ? 1 : -1; ··· 131 131 struct cam_sensor *sensor = &camif->sensor; 132 132 int err = 0; 133 133 134 - if (!on == camif->sensor.stream_count) 134 + if (camif->sensor.stream_count == !on) 135 135 err = v4l2_subdev_call(sensor->sd, video, s_stream, on); 136 136 if (!err) 137 137 sensor->stream_count += on ? 1 : -1;