summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tda9887.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-06-04 14:20:11 -0400
committerMichael Krufky <mkrufky@linuxtv.org>2007-06-04 14:20:11 -0400
commit9ee5949a70d76f5d85edf7d5571af93917eeff0a (patch)
tree5bd89d65fe6d6852b7180ac611ae3fb13bed96cb /linux/drivers/media/video/tda9887.c
parent775f85f9f968985c9b5c9e6df137575a118fdf76 (diff)
downloadmediapointer-dvb-s2-9ee5949a70d76f5d85edf7d5571af93917eeff0a.tar.gz
mediapointer-dvb-s2-9ee5949a70d76f5d85edf7d5571af93917eeff0a.tar.bz2
tuner: define release callback for mt20xx, tda9887 and tda8290
From: Michael Krufky <mkrufky@linuxtv.org> Define tuner release callbacks for mt20xx, tda9887 and tda8290, so that these drivers can release their own private structures themselves. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/video/tda9887.c')
-rw-r--r--linux/drivers/media/video/tda9887.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c
index cce1defd3..38c57a838 100644
--- a/linux/drivers/media/video/tda9887.c
+++ b/linux/drivers/media/video/tda9887.c
@@ -602,6 +602,14 @@ static void tda9887_set_freq(struct i2c_client *client, unsigned int freq)
tda9887_configure(client);
}
+static void tda9887_release(struct i2c_client *c)
+{
+ struct tuner *t = i2c_get_clientdata(c);
+
+ kfree(t->priv);
+ t->priv = NULL;
+}
+
int tda9887_tuner_init(struct i2c_client *c)
{
struct tda9887_priv *priv = NULL;
@@ -622,6 +630,7 @@ int tda9887_tuner_init(struct i2c_client *c)
t->standby = tda9887_standby;
t->tuner_status = tda9887_tuner_status;
t->get_afc = tda9887_get_afc;
+ t->release = tda9887_release;
return 0;
}