Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114020
b: refs/heads/master
c: 3e01084
h: refs/heads/master
v: v3
  • Loading branch information
Darron Broad authored and Mauro Carvalho Chehab committed Oct 12, 2008
1 parent d28310f commit 6dd9e57
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 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: f907c0207924dd598db37092d331738e3fcb9fbd
refs/heads/master: 3e01084519a678b410df247581a51eeb1bbf11d5
5 changes: 4 additions & 1 deletion trunk/drivers/media/video/cx88/cx88-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,8 @@ static int video_open(struct inode *inode, struct file *file)
}
unlock_kernel();

atomic_inc(&core->users);

return 0;
}

Expand Down Expand Up @@ -926,7 +928,8 @@ static int video_release(struct inode *inode, struct file *file)
file->private_data = NULL;
kfree(fh);

cx88_call_i2c_clients (dev->core, TUNER_SET_STANDBY, NULL);
if(atomic_dec_and_test(&dev->core->users))
cx88_call_i2c_clients (dev->core, TUNER_SET_STANDBY, NULL);

return 0;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/video/cx88/cx88.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ struct cx88_core {
struct mutex lock;
/* various v4l controls */
u32 freq;
atomic_t users;

/* cx88-video needs to access cx8802 for hybrid tuner pll access. */
struct cx8802_dev *dvbdev;
Expand Down

0 comments on commit 6dd9e57

Please sign in to comment.