diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-02-08 11:05:37 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-02-08 11:05:37 -0200 |
commit | 6c16e60ebc542dfe803c0070aaf3e356185b521a (patch) | |
tree | 2aa7c6c70920c0f4a67a58a202f34f403df3a671 /linux/drivers/media/common/saa7146_fops.c | |
parent | 243c1d1fa0d09431bf84f02e4a20c002da7c08c7 (diff) | |
parent | 56a304929cac33ceb38bbb90f4bb30c9477f64d5 (diff) | |
download | mediapointer-dvb-s2-6c16e60ebc542dfe803c0070aaf3e356185b521a.tar.gz mediapointer-dvb-s2-6c16e60ebc542dfe803c0070aaf3e356185b521a.tar.bz2 |
Merged patch 3310 at tip
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/common/saa7146_fops.c')
-rw-r--r-- | linux/drivers/media/common/saa7146_fops.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/linux/drivers/media/common/saa7146_fops.c b/linux/drivers/media/common/saa7146_fops.c index 3396e399a..480a34a26 100644 --- a/linux/drivers/media/common/saa7146_fops.c +++ b/linux/drivers/media/common/saa7146_fops.c @@ -18,18 +18,18 @@ int saa7146_res_get(struct saa7146_fh *fh, unsigned int bit) } /* is it free? */ - down(&dev->lock); + mutex_lock(&dev->lock); if (vv->resources & bit) { DEB_D(("locked! vv->resources:0x%02x, we want:0x%02x\n",vv->resources,bit)); /* no, someone else uses it */ - up(&dev->lock); + mutex_unlock(&dev->lock); return 0; } /* it's free, grab it */ fh->resources |= bit; vv->resources |= bit; DEB_D(("res: get 0x%02x, cur:0x%02x\n",bit,vv->resources)); - up(&dev->lock); + mutex_unlock(&dev->lock); return 1; } @@ -41,11 +41,11 @@ void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits) if ((fh->resources & bits) != bits) BUG(); - down(&dev->lock); + mutex_lock(&dev->lock); fh->resources &= ~bits; vv->resources &= ~bits; DEB_D(("res: put 0x%02x, cur:0x%02x\n",bits,vv->resources)); - up(&dev->lock); + mutex_unlock(&dev->lock); } @@ -205,7 +205,7 @@ static int fops_open(struct inode *inode, struct file *file) DEB_EE(("inode:%p, file:%p, minor:%d\n",inode,file,minor)); - if (down_interruptible(&saa7146_devices_lock)) + if (mutex_lock_interruptible(&saa7146_devices_lock)) return -ERESTARTSYS; list_for_each(list,&saa7146_devices) { @@ -277,7 +277,7 @@ out: kfree(fh); file->private_data = NULL; } - up(&saa7146_devices_lock); + mutex_unlock(&saa7146_devices_lock); return result; } @@ -288,7 +288,7 @@ static int fops_release(struct inode *inode, struct file *file) DEB_EE(("inode:%p, file:%p\n",inode,file)); - if (down_interruptible(&saa7146_devices_lock)) + if (mutex_lock_interruptible(&saa7146_devices_lock)) return -ERESTARTSYS; if( fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) { @@ -304,7 +304,7 @@ static int fops_release(struct inode *inode, struct file *file) file->private_data = NULL; kfree(fh); - up(&saa7146_devices_lock); + mutex_unlock(&saa7146_devices_lock); return 0; } |