diff mbox

sn9c20x: fixed exposure control for HV7131R sensor

Message ID 1255989349.4536.22.camel@pexis.zodiac.net (mailing list archive)
State Changes Requested
Headers show

Commit Message

German Galkin Oct. 19, 2009, 9:55 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/video/gspca/sn9c20x.c
b/drivers/media/video/gspca/sn9c20x.c
index 99632a7..f173b35 100644
--- a/drivers/media/video/gspca/sn9c20x.c
+++ b/drivers/media/video/gspca/sn9c20x.c
@@ -1656,9 +1656,9 @@  static int set_exposure(struct gspca_dev
*gspca_dev)
        case SENSOR_HV7131R:
                exp[0] |= (4 << 4);
                exp[2] = 0x25;
-               exp[3] = ((sd->exposure * 0xffffff) / 0xffff) >> 16;
-               exp[4] = ((sd->exposure * 0xffffff) / 0xffff) >> 8;
-               exp[5] = ((sd->exposure * 0xffffff) / 0xffff) & 0xff;
+               exp[3] = (sd->exposure >> 5) & 0xff;
+               exp[4] = (sd->exposure << 3) & 0xff;
+               exp[5] = 0;
                break;
        default: