Lines Matching defs:state
34 /* state cache */
39 static int tda8261_read(struct tda8261_state *state, u8 *buf)
41 const struct tda8261_config *config = state->config;
45 if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1)
51 static int tda8261_write(struct tda8261_state *state, u8 *buf)
53 const struct tda8261_config *config = state->config;
57 if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1)
65 struct tda8261_state *state = fe->tuner_priv;
71 if ((err = tda8261_read(state, &result)) < 0) {
90 struct tda8261_state *state = fe->tuner_priv;
95 tstate->frequency = state->frequency;
113 struct tda8261_state *state = fe->tuner_priv;
114 const struct tda8261_config *config = state->config;
146 if ((err = tda8261_write(state, buf)) < 0) {
160 state->frequency = frequency; /* cache successful state */
174 struct tda8261_state *state = fe->tuner_priv;
177 kfree(state);
201 struct tda8261_state *state = NULL;
203 if ((state = kzalloc(sizeof (struct tda8261_state), GFP_KERNEL)) == NULL)
206 state->config = config;
207 state->i2c = i2c;
208 state->fe = fe;
209 fe->tuner_priv = state;
222 kfree(state);