mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-23 01:40:30 +00:00
[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>
This commit is contained in:
parent
874c65f038
commit
7e0d4e9226
@ -115,7 +115,7 @@ static int sensor_set_power(struct camif_dev *camif, int on)
|
||||
struct cam_sensor *sensor = &camif->sensor;
|
||||
int err = 0;
|
||||
|
||||
if (!on == camif->sensor.power_count)
|
||||
if (camif->sensor.power_count == !on)
|
||||
err = v4l2_subdev_call(sensor->sd, core, s_power, on);
|
||||
if (!err)
|
||||
sensor->power_count += on ? 1 : -1;
|
||||
@ -131,7 +131,7 @@ static int sensor_set_streaming(struct camif_dev *camif, int on)
|
||||
struct cam_sensor *sensor = &camif->sensor;
|
||||
int err = 0;
|
||||
|
||||
if (!on == camif->sensor.stream_count)
|
||||
if (camif->sensor.stream_count == !on)
|
||||
err = v4l2_subdev_call(sensor->sd, video, s_stream, on);
|
||||
if (!err)
|
||||
sensor->stream_count += on ? 1 : -1;
|
||||
|
Loading…
Reference in New Issue
Block a user