aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/mr97310a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/gspca/mr97310a.c')
-rw-r--r--drivers/media/video/gspca/mr97310a.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/media/video/gspca/mr97310a.c b/drivers/media/video/gspca/mr97310a.c
index 57ea1c772214..d2bfdec1c907 100644
--- a/drivers/media/video/gspca/mr97310a.c
+++ b/drivers/media/video/gspca/mr97310a.c
@@ -814,9 +814,8 @@ static int sd_start(struct gspca_dev *gspca_dev)
814 814
815 /* Some of the VGA cameras require the memory pointer 815 /* Some of the VGA cameras require the memory pointer
816 * to be set to 0 again. We have been forced to start the 816 * to be set to 0 again. We have been forced to start the
817 * stream somewhere else to detect the hardware, and closed it, 817 * stream in sd_config() to detect the hardware, and closed it.
818 * and now since we are restarting the stream we need to do a 818 * Thus, we need here to do a completely fresh and clean start. */
819 * completely fresh and clean start. */
820 err_code = zero_the_pointer(gspca_dev); 819 err_code = zero_the_pointer(gspca_dev);
821 if (err_code < 0) 820 if (err_code < 0)
822 return err_code; 821 return err_code;
@@ -875,7 +874,7 @@ static void setbrightness(struct gspca_dev *gspca_dev)
875 value_reg += 4; 874 value_reg += 4;
876 } 875 }
877 876
878 /* Note register 7 is also seen as 0x8x or 0xCx in dumps */ 877 /* Note register 7 is also seen as 0x8x or 0xCx in some dumps */
879 if (sd->brightness > 0) { 878 if (sd->brightness > 0) {
880 sensor_write1(gspca_dev, sign_reg, 0x00); 879 sensor_write1(gspca_dev, sign_reg, 0x00);
881 val = sd->brightness; 880 val = sd->brightness;
@@ -900,7 +899,7 @@ static void setexposure(struct gspca_dev *gspca_dev)
900 return; 899 return;
901 900
902 if (sd->cam_type == CAM_TYPE_CIF && sd->sensor_type == 1) { 901 if (sd->cam_type == CAM_TYPE_CIF && sd->sensor_type == 1) {
903 /* This cam does not like exposure settings > 300, 902 /* This cam does not like exposure settings < 300,
904 so scale 0 - 4095 to 300 - 4095 */ 903 so scale 0 - 4095 to 300 - 4095 */
905 exposure = (sd->exposure * 9267) / 10000 + 300; 904 exposure = (sd->exposure * 9267) / 10000 + 300;
906 sensor_write1(gspca_dev, 3, exposure >> 4); 905 sensor_write1(gspca_dev, 3, exposure >> 4);
@@ -908,7 +907,7 @@ static void setexposure(struct gspca_dev *gspca_dev)
908 } else { 907 } else {
909 /* We have both a clock divider and an exposure register. 908 /* We have both a clock divider and an exposure register.
910 We first calculate the clock divider, as that determines 909 We first calculate the clock divider, as that determines
911 the maximum exposure and then we calculayte the exposure 910 the maximum exposure and then we calculate the exposure
912 register setting (which goes from 0 - 511). 911 register setting (which goes from 0 - 511).
913 912
914 Note our 0 - 4095 exposure is mapped to 0 - 511 913 Note our 0 - 4095 exposure is mapped to 0 - 511