Individual tuner drivers are now allocating memory themselves for
their own private data structures. This changeset adds a release
callback to the tuner operations, so that newer drivers that may
require more complex data structures may release this private data
themselves.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
}
/* discard private data, in case set_type() was previously called */
+ if (t->release)
+ t->release(c);
kfree(t->priv);
t->priv = NULL;
+
switch (t->type) {
case TUNER_MT2032:
microtune_init(c);
return err;
}
+ if (t->release)
+ t->release(client);
kfree(t->priv);
kfree(t);
return 0;
int (*get_afc)(struct i2c_client *c);
void (*tuner_status)(struct i2c_client *c);
void (*standby)(struct i2c_client *c);
+ void (*release)(struct i2c_client *c);
};
extern unsigned const int tuner_count;