Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138203
b: refs/heads/master
c: 4ff5ed4
h: refs/heads/master
i:
  138201: 273b016
  138199: 61be533
v: v3
  • Loading branch information
Devin Heitmueller authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent 0fbd3af commit b226344
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7fdd7c72ad65ef98d1071cf4cd8a39490f423bae
refs/heads/master: 4ff5ed44f84aed6727ec226853a1c6b03c36db5e
15 changes: 12 additions & 3 deletions trunk/drivers/media/dvb/frontends/au8522_dig.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ static int debug;
/* Despite the name "hybrid_tuner", the framework works just as well for
hybrid demodulators as well... */
static LIST_HEAD(hybrid_tuner_instance_list);
static DEFINE_MUTEX(au8522_list_mutex);

#define dprintk(arg...) do { \
if (debug) \
Expand Down Expand Up @@ -795,15 +796,23 @@ static struct dvb_frontend_ops au8522_ops;
int au8522_get_state(struct au8522_state **state, struct i2c_adapter *i2c,
u8 client_address)
{
return hybrid_tuner_request_state(struct au8522_state, (*state),
hybrid_tuner_instance_list,
i2c, client_address, "au8522");
int ret;

mutex_lock(&au8522_list_mutex);
ret = hybrid_tuner_request_state(struct au8522_state, (*state),
hybrid_tuner_instance_list,
i2c, client_address, "au8522");
mutex_unlock(&au8522_list_mutex);

return ret;
}

void au8522_release_state(struct au8522_state *state)
{
mutex_lock(&au8522_list_mutex);
if (state != NULL)
hybrid_tuner_release_state(state);
mutex_unlock(&au8522_list_mutex);
}


Expand Down

0 comments on commit b226344

Please sign in to comment.