Commit 85de5e06 authored by Akinobu Mita's avatar Akinobu Mita Committed by Mauro Carvalho Chehab

media: v4l2-common: add V4L2_FRACT_COMPARE

Add macro to compare two v4l2_fract values in v4l2 common internal API.
The same macro FRACT_CMP() is used by vivid and bcm2835-camera.  This just
renames it to V4L2_FRACT_COMPARE in order to avoid namespace collision.

Cc: Matt Ranostay <matt.ranostay@konsulko.com>
Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent ae9e196d
...@@ -396,4 +396,9 @@ int v4l2_g_parm_cap(struct video_device *vdev, ...@@ -396,4 +396,9 @@ int v4l2_g_parm_cap(struct video_device *vdev,
int v4l2_s_parm_cap(struct video_device *vdev, int v4l2_s_parm_cap(struct video_device *vdev,
struct v4l2_subdev *sd, struct v4l2_streamparm *a); struct v4l2_subdev *sd, struct v4l2_streamparm *a);
/* Compare two v4l2_fract structs */
#define V4L2_FRACT_COMPARE(a, OP, b) \
((u64)(a).numerator * (b).denominator OP \
(u64)(b).numerator * (a).denominator)
#endif /* V4L2_COMMON_H_ */ #endif /* V4L2_COMMON_H_ */
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