diff options
Diffstat (limited to 'linux/drivers/media/video/saa7115.c')
-rw-r--r-- | linux/drivers/media/video/saa7115.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/linux/drivers/media/video/saa7115.c b/linux/drivers/media/video/saa7115.c index 84258d44b..c1cf58652 100644 --- a/linux/drivers/media/video/saa7115.c +++ b/linux/drivers/media/video/saa7115.c @@ -1057,9 +1057,6 @@ static int saa711x_get_v4lfmt(struct i2c_client *client, struct v4l2_format *fmt return 0; } -/* - * Sets Task B FIR filters to scale - works only on saa7114 or upper - */ static int saa711x_set_size(struct i2c_client *client, int width, int height) { struct saa711x_state *state = i2c_get_clientdata(client); @@ -1083,14 +1080,14 @@ static int saa711x_set_size(struct i2c_client *client, int width, int height) return -EINVAL; if (height != Vsrc) return -EINVAL; - - return 0; } + if (!saa711x_has_reg(state->ident,R_CC_B_HORIZ_OUTPUT_WINDOW_LENGTH)) + return 0; /* probably have a valid size, let's set it */ /* Set output width/height */ - /* width */ + saa711x_write(client, R_CC_B_HORIZ_OUTPUT_WINDOW_LENGTH, (u8) (width & 0xff)); saa711x_write(client, R_CD_B_HORIZ_OUTPUT_WINDOW_LENGTH_MSB, |