struct or51211_state {
struct i2c_adapter* i2c;
+ struct dvb_frontend_ops ops;
/* Configuration settings */
const struct or51211_config* config;
}
ret = or51211_load_firmware(fe, fw);
- release_firmware(fw);
if (ret) {
printk(KERN_WARNING "or51211: Writing firmware to "
"device failed!\n");
+ release_firmware(fw);
return ret;
}
printk(KERN_INFO "or51211: Firmware upload complete.\n");
/* Setup the state */
state->config = config;
state->i2c = i2c;
+ memcpy(&state->ops, &or51211_ops, sizeof(struct dvb_frontend_ops));
state->initialized = 0;
state->current_frequency = 0;
/* Create dvb_frontend */
- memcpy(&state->frontend.ops, &or51211_ops, sizeof(struct dvb_frontend_ops));
+ state->frontend.ops = &state->ops;
state->frontend.demodulator_priv = state;
return &state->frontend;