diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2019-06-15 11:00:57 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-06-21 17:13:58 -0400 |
commit | 94954bb709c998aeda73be42bb18a7911b6413b4 (patch) | |
tree | 9d1cbe45d56e746d8db6201dbc9e44ce73781bf1 | |
parent | eef4d8e9f06dd06496ea82400f26379c4de8797c (diff) |
media: video-i2c: use V4L2_FRACT_COMPARE
Use V4L2_FRACT_COMPARE to check whether two v4l2_fract structs are equal.
Cc: Matt Ranostay <matt.ranostay@konsulko.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r-- | drivers/media/i2c/video-i2c.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c index abd3152df7d0..078141712c88 100644 --- a/drivers/media/i2c/video-i2c.c +++ b/drivers/media/i2c/video-i2c.c | |||
@@ -190,12 +190,8 @@ static int mlx90640_setup(struct video_i2c_data *data) | |||
190 | unsigned int n, idx; | 190 | unsigned int n, idx; |
191 | 191 | ||
192 | for (n = 0; n < data->chip->num_frame_intervals - 1; n++) { | 192 | for (n = 0; n < data->chip->num_frame_intervals - 1; n++) { |
193 | if (data->frame_interval.numerator | 193 | if (V4L2_FRACT_COMPARE(data->frame_interval, ==, |
194 | != data->chip->frame_intervals[n].numerator) | 194 | data->chip->frame_intervals[n])) |
195 | continue; | ||
196 | |||
197 | if (data->frame_interval.denominator | ||
198 | == data->chip->frame_intervals[n].denominator) | ||
199 | break; | 195 | break; |
200 | } | 196 | } |
201 | 197 | ||