Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=024cf53089f7c8e58934407f07ca2a7b5bed3b06
Commit:     024cf53089f7c8e58934407f07ca2a7b5bed3b06
Parent:     be2b85a13543bbaf1a141b3a54f84c1e3b059e69
Author:     Michael Krufky <[EMAIL PROTECTED]>
AuthorDate: Mon Jun 4 15:20:11 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Wed Jul 18 14:23:55 2007 -0300

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/mt20xx.c  |    9 +++++++++
 drivers/media/video/tda8290.c |    9 +++++++++
 drivers/media/video/tda9887.c |    9 +++++++++
 3 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/mt20xx.c b/drivers/media/video/mt20xx.c
index d7e68a6..5b33be8 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;
diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c
index 7bdf968..2614ea9 100644
--- a/drivers/media/video/tda8290.c
+++ b/drivers/media/video/tda8290.c
@@ -595,6 +595,14 @@ static void tda8290_init_tuner(struct i2c_client *c)
 
 /*---------------------------------------------------------------------*/
 
+static void tda8290_release(struct i2c_client *c)
+{
+       struct tuner *t = i2c_get_clientdata(c);
+
+       kfree(t->priv);
+       t->priv = NULL;
+}
+
 int tda8290_init(struct i2c_client *c)
 {
        struct tda8290_priv *priv = NULL;
@@ -663,6 +671,7 @@ int tda8290_init(struct i2c_client *c)
        t->set_radio_freq = set_radio_freq;
        t->has_signal = has_signal;
        t->standby = standby;
+       t->release = tda8290_release;
        priv->tda827x_lpsel = 0;
        t->mode = V4L2_TUNER_ANALOG_TV;
 
diff --git a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c
index 01f18b0..f0443cc 100644
--- a/drivers/media/video/tda9887.c
+++ b/drivers/media/video/tda9887.c
@@ -591,6 +591,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;
@@ -611,6 +619,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;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to