From: Antti Palosaari Date: Fri, 11 Jul 2014 13:28:44 +0000 (-0300) Subject: [media] si2168: do not set values which are already on default X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=982c6238cfb88551dc0aa730c94acfae06b25412;p=linux-beck.git [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 --- 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;