Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61309
b: refs/heads/master
c: be2b85a
h: refs/heads/master
i:
  61307: 8bb2cfd
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Jul 18, 2007
1 parent 5e5da3c commit 6ca4c69
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9ee476a56c3ee119a02b6823659f5698b1241f04
refs/heads/master: be2b85a13543bbaf1a141b3a54f84c1e3b059e69
5 changes: 5 additions & 0 deletions trunk/drivers/media/video/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,11 @@ static void set_type(struct i2c_client *c, unsigned int type,
}

/* 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);
Expand Down Expand Up @@ -561,6 +564,8 @@ static int tuner_detach(struct i2c_client *client)
return err;
}

if (t->release)
t->release(client);
kfree(t->priv);
kfree(t);
return 0;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/media/tuner.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ struct tuner {
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;
Expand Down

0 comments on commit 6ca4c69

Please sign in to comment.