0362-bcm2835-camera-Fix-max-min-error-when-looping-over-c.patch 892 B

123456789101112131415161718192021222324
  1. From 91ed8882918caf0d80e822b1529b1e32e6eaa007 Mon Sep 17 00:00:00 2001
  2. From: popcornmix <popcornmix@gmail.com>
  3. Date: Tue, 24 May 2016 16:20:09 +0100
  4. Subject: [PATCH] bcm2835-camera: Fix max/min error when looping over
  5. cameras/resolutions
  6. See: https://github.com/raspberrypi/linux/issues/1447#issuecomment-221303506
  7. ---
  8. drivers/media/platform/bcm2835/bcm2835-camera.c | 4 ++--
  9. 1 file changed, 2 insertions(+), 2 deletions(-)
  10. --- a/drivers/media/platform/bcm2835/bcm2835-camera.c
  11. +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c
  12. @@ -1530,8 +1530,8 @@ static int get_num_cameras(struct vchiq_
  13. }
  14. for (i = 0;
  15. i < (cam_info.num_cameras > num_resolutions ?
  16. - cam_info.num_cameras :
  17. - num_resolutions);
  18. + num_resolutions :
  19. + cam_info.num_cameras);
  20. i++) {
  21. resolutions[i][0] = cam_info.cameras[i].max_width;
  22. resolutions[i][1] = cam_info.cameras[i].max_height;