[media] stb6100: get rid of tuner_state at struct stb6100_state
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 11 Nov 2015 18:52:46 +0000 (16:52 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 17 Nov 2015 08:41:53 +0000 (06:41 -0200)
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>
drivers/media/dvb-frontends/stb6100.c
drivers/media/dvb-frontends/stb6100.h

index e7f8d2c55565024d3dd8fc24ff8328a9331195bd..5d8dbde03249604d5d954a9aeb9879845cedee77 100644 (file)
@@ -252,6 +252,7 @@ static int stb6100_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth)
 {
        int rc;
        u8 f;
+       u32 bw;
        struct stb6100_state *state = fe->tuner_priv;
 
        rc = stb6100_read_reg(state, STB6100_F);
@@ -259,9 +260,9 @@ static int stb6100_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth)
                return rc;
        f = rc & STB6100_F_F;
 
-       state->status.bandwidth = (f + 5) * 2000;       /* x2 for ZIF   */
+       bw = (f + 5) * 2000;    /* x2 for ZIF   */
 
-       *bandwidth = state->bandwidth = state->status.bandwidth * 1000;
+       *bandwidth = state->bandwidth = bw * 1000;
        dprintk(verbose, FE_DEBUG, 1, "bandwidth = %u Hz", state->bandwidth);
        return 0;
 }
@@ -495,15 +496,13 @@ static int stb6100_sleep(struct dvb_frontend *fe)
 static int stb6100_init(struct dvb_frontend *fe)
 {
        struct stb6100_state *state = fe->tuner_priv;
-       struct tuner_state *status = &state->status;
        int refclk = 27000000; /* Hz */
 
        /*
         * iqsense = 1
         * tunerstep = 125000
         */
-       status->bandwidth       = 36000;        /* kHz  */
-       state->bandwidth        = status->bandwidth * 1000;     /* Hz   */
+       state->bandwidth        = 36000000;     /* Hz   */
        state->reference        = refclk / 1000;        /* kHz  */
 
        /* Set default bandwidth. Modified, PN 13-May-10        */
index 218c8188865d160577d820c73b21f87fa27c4876..f7b468b6dc2634a188435464fec23275d35ba4e2 100644 (file)
@@ -86,7 +86,6 @@ struct stb6100_state {
        const struct stb6100_config     *config;
        struct dvb_tuner_ops            ops;
        struct dvb_frontend             *frontend;
-       struct tuner_state              status;
 
        u32 frequency;
        u32 srate;
This page took 0.028395 seconds and 5 git commands to generate.