Commit 888680ff authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[media] si2168: set cmd args using memcpy

Use memcpy for set cmd buffer in order to keep style in line with
rest of file.
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 4de0ed7c
...@@ -95,20 +95,17 @@ static int si2168_read_status(struct dvb_frontend *fe, fe_status_t *status) ...@@ -95,20 +95,17 @@ static int si2168_read_status(struct dvb_frontend *fe, fe_status_t *status)
switch (c->delivery_system) { switch (c->delivery_system) {
case SYS_DVBT: case SYS_DVBT:
cmd.args[0] = 0xa0; memcpy(cmd.args, "\xa0\x01", 2);
cmd.args[1] = 0x01;
cmd.wlen = 2; cmd.wlen = 2;
cmd.rlen = 13; cmd.rlen = 13;
break; break;
case SYS_DVBC_ANNEX_A: case SYS_DVBC_ANNEX_A:
cmd.args[0] = 0x90; memcpy(cmd.args, "\x90\x01", 2);
cmd.args[1] = 0x01;
cmd.wlen = 2; cmd.wlen = 2;
cmd.rlen = 9; cmd.rlen = 9;
break; break;
case SYS_DVBT2: case SYS_DVBT2:
cmd.args[0] = 0x50; memcpy(cmd.args, "\x50\x01", 2);
cmd.args[1] = 0x01;
cmd.wlen = 2; cmd.wlen = 2;
cmd.rlen = 14; cmd.rlen = 14;
break; break;
...@@ -412,7 +409,7 @@ static int si2168_set_frontend(struct dvb_frontend *fe) ...@@ -412,7 +409,7 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
if (ret) if (ret)
goto err; goto err;
cmd.args[0] = 0x85; memcpy(cmd.args, "\x85", 1);
cmd.wlen = 1; cmd.wlen = 1;
cmd.rlen = 1; cmd.rlen = 1;
ret = si2168_cmd_execute(s, &cmd); ret = si2168_cmd_execute(s, &cmd);
...@@ -438,40 +435,21 @@ static int si2168_init(struct dvb_frontend *fe) ...@@ -438,40 +435,21 @@ static int si2168_init(struct dvb_frontend *fe)
dev_dbg(&s->client->dev, "%s:\n", __func__); dev_dbg(&s->client->dev, "%s:\n", __func__);
cmd.args[0] = 0xc0; memcpy(cmd.args, "\xc0\x12\x00\x0c\x00\x0d\x16\x00\x00\x00\x00\x00\x00", 13);
cmd.args[1] = 0x12;
cmd.args[2] = 0x00;
cmd.args[3] = 0x0c;
cmd.args[4] = 0x00;
cmd.args[5] = 0x0d;
cmd.args[6] = 0x16;
cmd.args[7] = 0x00;
cmd.args[8] = 0x00;
cmd.args[9] = 0x00;
cmd.args[10] = 0x00;
cmd.args[11] = 0x00;
cmd.args[12] = 0x00;
cmd.wlen = 13; cmd.wlen = 13;
cmd.rlen = 0; cmd.rlen = 0;
ret = si2168_cmd_execute(s, &cmd); ret = si2168_cmd_execute(s, &cmd);
if (ret) if (ret)
goto err; goto err;
cmd.args[0] = 0xc0; memcpy(cmd.args, "\xc0\x06\x01\x0f\x00\x20\x20\x01", 8);
cmd.args[1] = 0x06;
cmd.args[2] = 0x01;
cmd.args[3] = 0x0f;
cmd.args[4] = 0x00;
cmd.args[5] = 0x20;
cmd.args[6] = 0x20;
cmd.args[7] = 0x01;
cmd.wlen = 8; cmd.wlen = 8;
cmd.rlen = 1; cmd.rlen = 1;
ret = si2168_cmd_execute(s, &cmd); ret = si2168_cmd_execute(s, &cmd);
if (ret) if (ret)
goto err; goto err;
cmd.args[0] = 0x02; memcpy(cmd.args, "\x02", 1);
cmd.wlen = 1; cmd.wlen = 1;
cmd.rlen = 13; cmd.rlen = 13;
ret = si2168_cmd_execute(s, &cmd); ret = si2168_cmd_execute(s, &cmd);
...@@ -527,8 +505,7 @@ static int si2168_init(struct dvb_frontend *fe) ...@@ -527,8 +505,7 @@ static int si2168_init(struct dvb_frontend *fe)
release_firmware(fw); release_firmware(fw);
fw = NULL; fw = NULL;
cmd.args[0] = 0x01; memcpy(cmd.args, "\x01\x01", 2);
cmd.args[1] = 0x01;
cmd.wlen = 2; cmd.wlen = 2;
cmd.rlen = 1; cmd.rlen = 1;
ret = si2168_cmd_execute(s, &cmd); ret = si2168_cmd_execute(s, &cmd);
......
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