diff options
Diffstat (limited to 'drivers/media/video/gspca/pac207.c')
-rw-r--r-- | drivers/media/video/gspca/pac207.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/media/video/gspca/pac207.c b/drivers/media/video/gspca/pac207.c index 008954e755f1..84986684c4db 100644 --- a/drivers/media/video/gspca/pac207.c +++ b/drivers/media/video/gspca/pac207.c | |||
@@ -452,30 +452,30 @@ static void pac207_do_auto_gain(struct gspca_dev *gspca_dev) | |||
452 | 452 | ||
453 | for (i = 0; i < steps; i++) { | 453 | for (i = 0; i < steps; i++) { |
454 | if (avg_lum > desired_avg_lum) { | 454 | if (avg_lum > desired_avg_lum) { |
455 | if (sd->gain > PAC207_GAIN_KNEE) { | 455 | if (sd->gain > PAC207_GAIN_KNEE) |
456 | sd->gain--; | 456 | sd->gain--; |
457 | } else if (sd->exposure > PAC207_EXPOSURE_KNEE) { | 457 | else if (sd->exposure > PAC207_EXPOSURE_KNEE) |
458 | sd->exposure--; | 458 | sd->exposure--; |
459 | } else if (sd->gain > PAC207_GAIN_DEFAULT) { | 459 | else if (sd->gain > PAC207_GAIN_DEFAULT) |
460 | sd->gain--; | 460 | sd->gain--; |
461 | } else if (sd->exposure > PAC207_EXPOSURE_MIN) { | 461 | else if (sd->exposure > PAC207_EXPOSURE_MIN) |
462 | sd->exposure--; | 462 | sd->exposure--; |
463 | } else if (sd->gain > PAC207_GAIN_MIN) { | 463 | else if (sd->gain > PAC207_GAIN_MIN) |
464 | sd->gain--; | 464 | sd->gain--; |
465 | } else | 465 | else |
466 | break; | 466 | break; |
467 | } else { | 467 | } else { |
468 | if (sd->gain < PAC207_GAIN_DEFAULT) { | 468 | if (sd->gain < PAC207_GAIN_DEFAULT) |
469 | sd->gain++; | 469 | sd->gain++; |
470 | } else if (sd->exposure < PAC207_EXPOSURE_KNEE) { | 470 | else if (sd->exposure < PAC207_EXPOSURE_KNEE) |
471 | sd->exposure++; | 471 | sd->exposure++; |
472 | } else if (sd->gain < PAC207_GAIN_KNEE) { | 472 | else if (sd->gain < PAC207_GAIN_KNEE) |
473 | sd->gain++; | 473 | sd->gain++; |
474 | } else if (sd->exposure < PAC207_EXPOSURE_MAX) { | 474 | else if (sd->exposure < PAC207_EXPOSURE_MAX) |
475 | sd->exposure++; | 475 | sd->exposure++; |
476 | } else if (sd->gain < PAC207_GAIN_MAX) { | 476 | else if (sd->gain < PAC207_GAIN_MAX) |
477 | sd->gain++; | 477 | sd->gain++; |
478 | } else | 478 | else |
479 | break; | 479 | break; |
480 | } | 480 | } |
481 | } | 481 | } |