diff options
author | Erik Andr?n <erik.andren@gmail.com> | 2009-01-04 11:35:27 +0100 |
---|---|---|
committer | Erik Andr?n <erik.andren@gmail.com> | 2009-01-04 11:35:27 +0100 |
commit | e5da3241f55625c20de4bcc0e12da75f9ffd68fa (patch) | |
tree | 9ae52c905ef332ad494cc5fc20376fc0147ab741 /linux/drivers/media/video/gspca | |
parent | 847500330c44313131e8d7bf3956da4ed569462a (diff) | |
download | mediapointer-dvb-s2-e5da3241f55625c20de4bcc0e12da75f9ffd68fa.tar.gz mediapointer-dvb-s2-e5da3241f55625c20de4bcc0e12da75f9ffd68fa.tar.bz2 |
gspca - m5602: Minor cleanups
From: Erik Andr?n <erik.andren@gmail.com>
Remove an unnecessary error check and reorder some code.
Priority: normal
Signed-off-by: Erik Andr?n <erik.andren@gmail.com>
Diffstat (limited to 'linux/drivers/media/video/gspca')
-rw-r--r-- | linux/drivers/media/video/gspca/m5602/m5602_ov9650.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/linux/drivers/media/video/gspca/m5602/m5602_ov9650.c b/linux/drivers/media/video/gspca/m5602/m5602_ov9650.c index 583d8a086..86e4719fb 100644 --- a/linux/drivers/media/video/gspca/m5602/m5602_ov9650.c +++ b/linux/drivers/media/video/gspca/m5602/m5602_ov9650.c @@ -347,7 +347,6 @@ int ov9650_init(struct sd *sd) return err; err = ov9650_set_auto_gain(&sd->gspca_dev, sensor_settings[AUTO_GAIN_CTRL_IDX]); - return err; } @@ -369,9 +368,6 @@ int ov9650_start(struct sd *sd) if (width <= 320) hor_offs /= 2; - if (err < 0) - return err; - /* Synthesize the vsync/hsync setup */ for (i = 0; i < ARRAY_SIZE(res_init_ov9650) && !err; i++) { if (res_init_ov9650[i][0] == BRIDGE) @@ -437,9 +433,7 @@ int ov9650_start(struct sd *sd) data = OV9650_VGA_SELECT | OV9650_RGB_SELECT | OV9650_RAW_RGB_SELECT; - err = m5602_write_sensor(sd, OV9650_COM7, &data, 1); - break; case 352: @@ -447,9 +441,7 @@ int ov9650_start(struct sd *sd) data = OV9650_CIF_SELECT | OV9650_RGB_SELECT | OV9650_RAW_RGB_SELECT; - err = m5602_write_sensor(sd, OV9650_COM7, &data, 1); - break; case 320: @@ -457,9 +449,7 @@ int ov9650_start(struct sd *sd) data = OV9650_QVGA_SELECT | OV9650_RGB_SELECT | OV9650_RAW_RGB_SELECT; - err = m5602_write_sensor(sd, OV9650_COM7, &data, 1); - break; case 176: @@ -467,7 +457,6 @@ int ov9650_start(struct sd *sd) data = OV9650_QCIF_SELECT | OV9650_RGB_SELECT | OV9650_RAW_RGB_SELECT; - err = m5602_write_sensor(sd, OV9650_COM7, &data, 1); break; } @@ -502,7 +491,6 @@ void ov9650_disconnect(struct sd *sd) ov9650_power_down(sd); sd->sensor = NULL; - kfree(sd->sensor_priv); } @@ -526,7 +514,6 @@ int ov9650_set_exposure(struct gspca_dev *gspca_dev, __s32 val) PDEBUG(D_V4L2, "Set exposure to %d", val); sensor_settings[EXPOSURE_IDX] = val; - /* The 6 MSBs */ i2c_data = (val >> 10) & 0x3f; err = m5602_write_sensor(sd, OV9650_AECHM, @@ -544,7 +531,6 @@ int ov9650_set_exposure(struct gspca_dev *gspca_dev, __s32 val) /* The 2 LSBs */ i2c_data = val & 0x03; err = m5602_write_sensor(sd, OV9650_COM1, &i2c_data, 1); - return err; } @@ -612,7 +598,6 @@ int ov9650_set_red_balance(struct gspca_dev *gspca_dev, __s32 val) i2c_data = val & 0xff; err = m5602_write_sensor(sd, OV9650_RED, &i2c_data, 1); - return err; } @@ -640,7 +625,6 @@ int ov9650_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val) i2c_data = val & 0xff; err = m5602_write_sensor(sd, OV9650_BLUE, &i2c_data, 1); - return err; } @@ -648,9 +632,9 @@ int ov9650_get_hflip(struct gspca_dev *gspca_dev, __s32 *val) { struct sd *sd = (struct sd *) gspca_dev; s32 *sensor_settings = sd->sensor_priv; + *val = sensor_settings[HFLIP_IDX]; PDEBUG(D_V4L2, "Read horizontal flip %d", *val); - return 0; } |