From 024cf53089f7c8e58934407f07ca2a7b5bed3b06 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Mon, 4 Jun 2007 15:20:11 -0300 Subject: V4L/DVB (5742): Tuner: define release callback for mt20xx, tda9887 and tda8290 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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/mt20xx.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/media/video/mt20xx.c') diff --git a/drivers/media/video/mt20xx.c b/drivers/media/video/mt20xx.c index d7e68a639cd8..5b33be8a49cd 100644 --- a/drivers/media/video/mt20xx.c +++ b/drivers/media/video/mt20xx.c @@ -495,6 +495,14 @@ static int mt2050_init(struct i2c_client *c) return 0; } +static void microtune_release(struct i2c_client *c) +{ + struct tuner *t = i2c_get_clientdata(c); + + kfree(t->priv); + t->priv = NULL; +} + int microtune_init(struct i2c_client *c) { struct microtune_priv *priv = NULL; @@ -514,6 +522,7 @@ int microtune_init(struct i2c_client *c) t->set_tv_freq = NULL; t->set_radio_freq = NULL; t->standby = NULL; + t->release = microtune_release; if (t->std & V4L2_STD_525_60) { tuner_dbg("pinnacle ntsc\n"); priv->radio_if2 = 41300 * 1000; -- cgit v1.2.3