aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-11-11 13:52:46 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-11-17 03:41:53 -0500
commitcffdbfe7cf9c7201d4d6c3a0c6b224497595431a (patch)
treebe1159a8aafbb05eb221d5c614cce8f927cbfca9 /drivers
parent2184e2530c061ce6d26b80c346afb1a2c63db952 (diff)
[media] stb6100: get rid of tuner_state at struct stb6100_state
The stb6100 driver has a struct tuner_state on its state struct, that it is used only to store the bandwidth. Even so, this struct is not really used, as every time the bandwidth is get or set, it goes through the hardware. So, get rid of that. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb-frontends/stb6100.c9
-rw-r--r--drivers/media/dvb-frontends/stb6100.h1
2 files changed, 4 insertions, 6 deletions
diff --git a/drivers/media/dvb-frontends/stb6100.c b/drivers/media/dvb-frontends/stb6100.c
index e7f8d2c55565..5d8dbde03249 100644
--- a/drivers/media/dvb-frontends/stb6100.c
+++ b/drivers/media/dvb-frontends/stb6100.c
@@ -252,6 +252,7 @@ static int stb6100_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth)
252{ 252{
253 int rc; 253 int rc;
254 u8 f; 254 u8 f;
255 u32 bw;
255 struct stb6100_state *state = fe->tuner_priv; 256 struct stb6100_state *state = fe->tuner_priv;
256 257
257 rc = stb6100_read_reg(state, STB6100_F); 258 rc = stb6100_read_reg(state, STB6100_F);
@@ -259,9 +260,9 @@ static int stb6100_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth)
259 return rc; 260 return rc;
260 f = rc & STB6100_F_F; 261 f = rc & STB6100_F_F;
261 262
262 state->status.bandwidth = (f + 5) * 2000; /* x2 for ZIF */ 263 bw = (f + 5) * 2000; /* x2 for ZIF */
263 264
264 *bandwidth = state->bandwidth = state->status.bandwidth * 1000; 265 *bandwidth = state->bandwidth = bw * 1000;
265 dprintk(verbose, FE_DEBUG, 1, "bandwidth = %u Hz", state->bandwidth); 266 dprintk(verbose, FE_DEBUG, 1, "bandwidth = %u Hz", state->bandwidth);
266 return 0; 267 return 0;
267} 268}
@@ -495,15 +496,13 @@ static int stb6100_sleep(struct dvb_frontend *fe)
495static int stb6100_init(struct dvb_frontend *fe) 496static int stb6100_init(struct dvb_frontend *fe)
496{ 497{
497 struct stb6100_state *state = fe->tuner_priv; 498 struct stb6100_state *state = fe->tuner_priv;
498 struct tuner_state *status = &state->status;
499 int refclk = 27000000; /* Hz */ 499 int refclk = 27000000; /* Hz */
500 500
501 /* 501 /*
502 * iqsense = 1 502 * iqsense = 1
503 * tunerstep = 125000 503 * tunerstep = 125000
504 */ 504 */
505 status->bandwidth = 36000; /* kHz */ 505 state->bandwidth = 36000000; /* Hz */
506 state->bandwidth = status->bandwidth * 1000; /* Hz */
507 state->reference = refclk / 1000; /* kHz */ 506 state->reference = refclk / 1000; /* kHz */
508 507
509 /* Set default bandwidth. Modified, PN 13-May-10 */ 508 /* Set default bandwidth. Modified, PN 13-May-10 */
diff --git a/drivers/media/dvb-frontends/stb6100.h b/drivers/media/dvb-frontends/stb6100.h
index 218c8188865d..f7b468b6dc26 100644
--- a/drivers/media/dvb-frontends/stb6100.h
+++ b/drivers/media/dvb-frontends/stb6100.h
@@ -86,7 +86,6 @@ struct stb6100_state {
86 const struct stb6100_config *config; 86 const struct stb6100_config *config;
87 struct dvb_tuner_ops ops; 87 struct dvb_tuner_ops ops;
88 struct dvb_frontend *frontend; 88 struct dvb_frontend *frontend;
89 struct tuner_state status;
90 89
91 u32 frequency; 90 u32 frequency;
92 u32 srate; 91 u32 srate;