media: vgxy61: Replace nested min() with single min3()

Use min3() macro instead of nesting min() to simplify the return
statement.

Signed-off-by: Qasim Ijaz <qasdev00@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
This commit is contained in:
Qasim Ijaz 2025-02-25 12:59:37 +00:00 committed by Hans Verkuil
parent 5de9a5165f
commit ab936836ec

View file

@ -892,8 +892,8 @@ static u32 vgxy61_get_expo_long_max(struct vgxy61_dev *sensor,
third_rot_max_expo = (sensor->frame_length / 71) * short_expo_ratio;
/* Take the minimum from all rules */
return min(min(first_rot_max_expo, second_rot_max_expo),
third_rot_max_expo);
return min3(first_rot_max_expo, second_rot_max_expo,
third_rot_max_expo);
}
static int vgxy61_update_exposure(struct vgxy61_dev *sensor, u16 new_expo_long,