Commit 1577461b authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] adv7604: adv7604_s_register clean up

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 547ed542
...@@ -718,45 +718,47 @@ static int adv7604_g_register(struct v4l2_subdev *sd, ...@@ -718,45 +718,47 @@ static int adv7604_g_register(struct v4l2_subdev *sd,
static int adv7604_s_register(struct v4l2_subdev *sd, static int adv7604_s_register(struct v4l2_subdev *sd,
const struct v4l2_dbg_register *reg) const struct v4l2_dbg_register *reg)
{ {
u8 val = reg->val & 0xff;
switch (reg->reg >> 8) { switch (reg->reg >> 8) {
case 0: case 0:
io_write(sd, reg->reg & 0xff, reg->val & 0xff); io_write(sd, reg->reg & 0xff, val);
break; break;
case 1: case 1:
avlink_write(sd, reg->reg & 0xff, reg->val & 0xff); avlink_write(sd, reg->reg & 0xff, val);
break; break;
case 2: case 2:
cec_write(sd, reg->reg & 0xff, reg->val & 0xff); cec_write(sd, reg->reg & 0xff, val);
break; break;
case 3: case 3:
infoframe_write(sd, reg->reg & 0xff, reg->val & 0xff); infoframe_write(sd, reg->reg & 0xff, val);
break; break;
case 4: case 4:
esdp_write(sd, reg->reg & 0xff, reg->val & 0xff); esdp_write(sd, reg->reg & 0xff, val);
break; break;
case 5: case 5:
dpp_write(sd, reg->reg & 0xff, reg->val & 0xff); dpp_write(sd, reg->reg & 0xff, val);
break; break;
case 6: case 6:
afe_write(sd, reg->reg & 0xff, reg->val & 0xff); afe_write(sd, reg->reg & 0xff, val);
break; break;
case 7: case 7:
rep_write(sd, reg->reg & 0xff, reg->val & 0xff); rep_write(sd, reg->reg & 0xff, val);
break; break;
case 8: case 8:
edid_write(sd, reg->reg & 0xff, reg->val & 0xff); edid_write(sd, reg->reg & 0xff, val);
break; break;
case 9: case 9:
hdmi_write(sd, reg->reg & 0xff, reg->val & 0xff); hdmi_write(sd, reg->reg & 0xff, val);
break; break;
case 0xa: case 0xa:
test_write(sd, reg->reg & 0xff, reg->val & 0xff); test_write(sd, reg->reg & 0xff, val);
break; break;
case 0xb: case 0xb:
cp_write(sd, reg->reg & 0xff, reg->val & 0xff); cp_write(sd, reg->reg & 0xff, val);
break; break;
case 0xc: case 0xc:
vdp_write(sd, reg->reg & 0xff, reg->val & 0xff); vdp_write(sd, reg->reg & 0xff, val);
break; break;
default: default:
v4l2_info(sd, "Register %03llx not supported\n", reg->reg); v4l2_info(sd, "Register %03llx not supported\n", reg->reg);
......
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