diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2007-06-17 17:14:12 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2007-06-17 17:14:12 -0300 |
commit | 3cdb220a4a1d645ee5c66d88700bf78e33389006 (patch) | |
tree | 2f5a016838023d51cfc08285f1c7d295002fcda0 /linux | |
parent | f897e2dc5035f072158729f103adfbecf7e21413 (diff) | |
download | mediapointer-dvb-s2-3cdb220a4a1d645ee5c66d88700bf78e33389006.tar.gz mediapointer-dvb-s2-3cdb220a4a1d645ee5c66d88700bf78e33389006.tar.bz2 |
tm6000: decrement users count
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/staging/tm6000/tm6000-video.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/linux/drivers/staging/tm6000/tm6000-video.c b/linux/drivers/staging/tm6000/tm6000-video.c index a67bcf7df..e167e973b 100644 --- a/linux/drivers/staging/tm6000/tm6000-video.c +++ b/linux/drivers/staging/tm6000/tm6000-video.c @@ -1502,8 +1502,12 @@ static int tm6000_release(struct inode *inode, struct file *file) dprintk(dev, V4L2_DEBUG_OPEN, "tm6000: close called (minor=%d, users=%d)\n",minor,dev->users); - tm6000_stop_thread(vidq); - videobuf_mmap_free(&fh->vb_vidq); + dev->users--; + + if (!dev->users) { + tm6000_stop_thread(vidq); + videobuf_mmap_free(&fh->vb_vidq); + } kfree (fh); |