Commit 85fa002f authored by Narcisa Ana Maria Vasile's avatar Narcisa Ana Maria Vasile Committed by Greg Kroah-Hartman

staging: bcm2835-camera: Replace ternary operator with min_t macro

Use macro min_t to get the minimum of two values for readability.
Signed-off-by: default avatarNarcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fb1e8765
......@@ -1539,9 +1539,7 @@ static int get_num_cameras(struct vchiq_mmal_instance *instance,
pr_info("Failed to get camera info\n");
}
for (i = 0;
i < (cam_info.num_cameras > num_resolutions ?
num_resolutions :
cam_info.num_cameras);
i < min_t(unsigned int, cam_info.num_cameras, num_resolutions);
i++) {
resolutions[i][0] = cam_info.cameras[i].max_width;
resolutions[i][1] = cam_info.cameras[i].max_height;
......
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