From 982c6238cfb88551dc0aa730c94acfae06b25412 Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Fri, 11 Jul 2014 10:28:44 -0300 Subject: [PATCH] [media] si2168: do not set values which are already on default No need to set explicitly value that are already defaulted same. Setting new value returns old value. Firmware default values can be found just looking returned value. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/si2168.c | 98 ---------------------------- 1 file changed, 98 deletions(-) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 7d0fb8f072fa..6220544c7df1 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -249,27 +249,6 @@ static int si2168_set_frontend(struct dvb_frontend *fe) if (ret) goto err; - memcpy(cmd.args, "\x14\x00\x01\x04\x00\x00", 6); - cmd.wlen = 6; - cmd.rlen = 1; - ret = si2168_cmd_execute(s, &cmd); - if (ret) - goto err; - - memcpy(cmd.args, "\x14\x00\x03\x10\x17\x00", 6); - cmd.wlen = 6; - cmd.rlen = 1; - ret = si2168_cmd_execute(s, &cmd); - if (ret) - goto err; - - memcpy(cmd.args, "\x14\x00\x02\x10\x15\x00", 6); - cmd.wlen = 6; - cmd.rlen = 1; - ret = si2168_cmd_execute(s, &cmd); - if (ret) - goto err; - memcpy(cmd.args, "\x14\x00\x0c\x10\x12\x00", 6); cmd.wlen = 6; cmd.rlen = 1; @@ -284,13 +263,6 @@ static int si2168_set_frontend(struct dvb_frontend *fe) if (ret) goto err; - memcpy(cmd.args, "\x14\x00\x0b\x10\x88\x13", 6); - cmd.wlen = 6; - cmd.rlen = 1; - ret = si2168_cmd_execute(s, &cmd); - if (ret) - goto err; - memcpy(cmd.args, "\x14\x00\x07\x10\x00\x24", 6); cmd.wlen = 6; cmd.rlen = 1; @@ -306,20 +278,6 @@ static int si2168_set_frontend(struct dvb_frontend *fe) if (ret) goto err; - memcpy(cmd.args, "\x14\x00\x04\x10\x15\x00", 6); - cmd.wlen = 6; - cmd.rlen = 1; - ret = si2168_cmd_execute(s, &cmd); - if (ret) - goto err; - - memcpy(cmd.args, "\x14\x00\x05\x10\xa1\x00", 6); - cmd.wlen = 6; - cmd.rlen = 1; - ret = si2168_cmd_execute(s, &cmd); - if (ret) - goto err; - memcpy(cmd.args, "\x14\x00\x0f\x10\x10\x00", 6); cmd.wlen = 6; cmd.rlen = 1; @@ -327,13 +285,6 @@ static int si2168_set_frontend(struct dvb_frontend *fe) if (ret) goto err; - memcpy(cmd.args, "\x14\x00\x0d\x10\xd0\x02", 6); - cmd.wlen = 6; - cmd.rlen = 1; - ret = si2168_cmd_execute(s, &cmd); - if (ret) - goto err; - memcpy(cmd.args, "\x14\x00\x01\x10\x16\x00", 6); cmd.wlen = 6; cmd.rlen = 1; @@ -355,55 +306,6 @@ static int si2168_set_frontend(struct dvb_frontend *fe) if (ret) goto err; - memcpy(cmd.args, "\x14\x00\x04\x03\x00\x00", 6); - cmd.wlen = 6; - cmd.rlen = 1; - ret = si2168_cmd_execute(s, &cmd); - if (ret) - goto err; - - memcpy(cmd.args, "\x14\x00\x03\x03\x00\x00", 6); - cmd.wlen = 6; - cmd.rlen = 1; - ret = si2168_cmd_execute(s, &cmd); - if (ret) - goto err; - - memcpy(cmd.args, "\x14\x00\x08\x03\x00\x00", 6); - cmd.wlen = 6; - cmd.rlen = 1; - ret = si2168_cmd_execute(s, &cmd); - if (ret) - goto err; - - memcpy(cmd.args, "\x14\x00\x07\x03\x01\x02", 6); - cmd.wlen = 6; - cmd.rlen = 1; - ret = si2168_cmd_execute(s, &cmd); - if (ret) - goto err; - - memcpy(cmd.args, "\x14\x00\x06\x03\x00\x00", 6); - cmd.wlen = 6; - cmd.rlen = 1; - ret = si2168_cmd_execute(s, &cmd); - if (ret) - goto err; - - memcpy(cmd.args, "\x14\x00\x05\x03\x00\x00", 6); - cmd.wlen = 6; - cmd.rlen = 1; - ret = si2168_cmd_execute(s, &cmd); - if (ret) - goto err; - - memcpy(cmd.args, "\x14\x00\x01\x03\x0c\x40", 6); - cmd.wlen = 6; - cmd.rlen = 1; - ret = si2168_cmd_execute(s, &cmd); - if (ret) - goto err; - memcpy(cmd.args, "\x14\x00\x01\x12\x00\x00", 6); cmd.wlen = 6; cmd.rlen = 1; -- 2.20.1