From: Daniel Scheller <d.scheller.oss@gmail.com>
To: linux-media@vger.kernel.org, mchehab@kernel.org,
mchehab@s-opensource.com
Cc: jasmin@anw.at, r.scobie@clear.net.nz
Subject: [PATCH 1/7] [media] dvb-frontends/stv0910: fix STR assignment, remove unneeded var
Date: Sun, 23 Jul 2017 12:13:09 +0200 [thread overview]
Message-ID: <20170723101315.12523-2-d.scheller.oss@gmail.com> (raw)
In-Reply-To: <20170723101315.12523-1-d.scheller.oss@gmail.com>
From: Daniel Scheller <d.scheller@gmx.net>
According to the documentation, FE_SCALE_DECIBEL values should be assigned
to .svalue and not .uvalue, so let's do this. While at it, remove the
unneeded strength var from read_signal_strength().
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
---
drivers/media/dvb-frontends/stv0910.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/media/dvb-frontends/stv0910.c b/drivers/media/dvb-frontends/stv0910.c
index bae1da3fdb2d..4084c142f1e4 100644
--- a/drivers/media/dvb-frontends/stv0910.c
+++ b/drivers/media/dvb-frontends/stv0910.c
@@ -1321,7 +1321,6 @@ static void read_signal_strength(struct dvb_frontend *fe)
{
struct stv *state = fe->demodulator_priv;
struct dtv_frontend_properties *p = &state->fe.dtv_property_cache;
- s64 strength;
u8 reg[2];
u16 agc;
s32 padc, power = 0;
@@ -1341,10 +1340,8 @@ static void read_signal_strength(struct dvb_frontend *fe)
padc = table_lookup(padc_lookup, ARRAY_SIZE(padc_lookup), power) + 352;
- strength = (padc - agc);
-
p->strength.stat[0].scale = FE_SCALE_DECIBEL;
- p->strength.stat[0].uvalue = strength;
+ p->strength.stat[0].svalue = (padc - agc);
}
static int read_status(struct dvb_frontend *fe, enum fe_status *status)
--
2.13.0
next prev parent reply other threads:[~2017-07-23 10:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-23 10:13 [PATCH 0/7] stv0910/stv6111 updates Daniel Scheller
2017-07-23 10:13 ` Daniel Scheller [this message]
2017-07-23 10:13 ` [PATCH 2/7] [media] dvb-frontends/stv0910: implement diseqc_send_burst Daniel Scheller
2017-07-23 10:13 ` [PATCH 3/7] [media] dvb-frontends/stv0910: further coding style cleanup Daniel Scheller
2017-07-23 10:13 ` [PATCH 4/7] [media] dvb-frontends/stv0910: cosmetics: fixup comments, misc Daniel Scheller
2017-07-23 10:13 ` [PATCH 5/7] [media] dvb-frontends/stv6111: coding style cleanup Daniel Scheller
2017-07-23 10:13 ` [PATCH 6/7] [media] dvb-frontends/stv6111: cosmetics: comments fixup, misc Daniel Scheller
2017-07-23 10:13 ` [PATCH 7/7] [media] dvb-frontends/stv{0910,6111}: constify tables Daniel Scheller
2017-07-23 15:22 ` [PATCH 0/7] stv0910/stv6111 updates Jasmin J.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170723101315.12523-2-d.scheller.oss@gmail.com \
--to=d.scheller.oss@gmail.com \
--cc=jasmin@anw.at \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=mchehab@s-opensource.com \
--cc=r.scobie@clear.net.nz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox