Lines Matching defs:state
22 /* state cache */
27 static int tda8261_read(struct tda8261_state *state, u8 *buf)
29 const struct tda8261_config *config = state->config;
33 if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1)
39 static int tda8261_write(struct tda8261_state *state, u8 *buf)
41 const struct tda8261_config *config = state->config;
45 if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1)
53 struct tda8261_state *state = fe->tuner_priv;
59 if ((err = tda8261_read(state, &result)) < 0) {
76 struct tda8261_state *state = fe->tuner_priv;
78 *frequency = state->frequency;
86 struct tda8261_state *state = fe->tuner_priv;
87 const struct tda8261_config *config = state->config;
119 err = tda8261_write(state, buf);
135 state->frequency = frequency; /* cache successful state */
145 struct tda8261_state *state = fe->tuner_priv;
148 kfree(state);
169 struct tda8261_state *state = NULL;
171 if ((state = kzalloc(sizeof (struct tda8261_state), GFP_KERNEL)) == NULL)
174 state->config = config;
175 state->i2c = i2c;
176 state->fe = fe;
177 fe->tuner_priv = state;
187 kfree(state);