Commit 94954bb7 authored by Akinobu Mita's avatar Akinobu Mita Committed by Mauro Carvalho Chehab

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: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent eef4d8e9
......@@ -190,12 +190,8 @@ static int mlx90640_setup(struct video_i2c_data *data)
unsigned int n, idx;
for (n = 0; n < data->chip->num_frame_intervals - 1; n++) {
if (data->frame_interval.numerator
!= data->chip->frame_intervals[n].numerator)
continue;
if (data->frame_interval.denominator
== data->chip->frame_intervals[n].denominator)
if (V4L2_FRACT_COMPARE(data->frame_interval, ==,
data->chip->frame_intervals[n]))
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment