Commit 6f43dbfd authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] saa7115: use the new auto cluster support

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 34ebdc97
...@@ -793,7 +793,6 @@ static int saa711x_s_ctrl(struct v4l2_ctrl *ctrl) ...@@ -793,7 +793,6 @@ static int saa711x_s_ctrl(struct v4l2_ctrl *ctrl)
saa711x_write(sd, R_0F_CHROMA_GAIN_CNTL, state->gain->val); saa711x_write(sd, R_0F_CHROMA_GAIN_CNTL, state->gain->val);
else else
saa711x_write(sd, R_0F_CHROMA_GAIN_CNTL, state->gain->val | 0x80); saa711x_write(sd, R_0F_CHROMA_GAIN_CNTL, state->gain->val | 0x80);
v4l2_ctrl_activate(state->gain, !state->agc->val);
break; break;
default: default:
...@@ -1601,7 +1600,6 @@ static int saa711x_probe(struct i2c_client *client, ...@@ -1601,7 +1600,6 @@ static int saa711x_probe(struct i2c_client *client,
V4L2_CID_CHROMA_AGC, 0, 1, 1, 1); V4L2_CID_CHROMA_AGC, 0, 1, 1, 1);
state->gain = v4l2_ctrl_new_std(hdl, &saa711x_ctrl_ops, state->gain = v4l2_ctrl_new_std(hdl, &saa711x_ctrl_ops,
V4L2_CID_CHROMA_GAIN, 0, 127, 1, 40); V4L2_CID_CHROMA_GAIN, 0, 127, 1, 40);
state->gain->flags |= V4L2_CTRL_FLAG_VOLATILE;
sd->ctrl_handler = hdl; sd->ctrl_handler = hdl;
if (hdl->error) { if (hdl->error) {
int err = hdl->error; int err = hdl->error;
...@@ -1610,8 +1608,7 @@ static int saa711x_probe(struct i2c_client *client, ...@@ -1610,8 +1608,7 @@ static int saa711x_probe(struct i2c_client *client,
kfree(state); kfree(state);
return err; return err;
} }
state->agc->flags |= V4L2_CTRL_FLAG_UPDATE; v4l2_ctrl_auto_cluster(2, &state->agc, 0, true);
v4l2_ctrl_cluster(2, &state->agc);
state->input = -1; state->input = -1;
state->output = SAA7115_IPORT_ON; state->output = SAA7115_IPORT_ON;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment