summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/em28xx
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2006-01-15 09:52:23 +0000
committerMauro Carvalho Chehab <devnull@localhost>2006-01-15 09:52:23 +0000
commit12c8d4bd89de115b407917fa0afcadd53729396c (patch)
tree2138cc6008c41c35fe01105ef1e5dd1681beff20 /linux/drivers/media/video/em28xx
parent4f37f2dabb3c3ef9675c7e9b3980aa9da78e4754 (diff)
downloadmediapointer-dvb-s2-12c8d4bd89de115b407917fa0afcadd53729396c.tar.gz
mediapointer-dvb-s2-12c8d4bd89de115b407917fa0afcadd53729396c.tar.bz2
Semaphore to mutex conversion on drivers/media
From: Ingo Molnar <mingo@elte.hu> Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/em28xx')
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-video.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c
index 4dafd59e8..dafba97e2 100644
--- a/linux/drivers/media/video/em28xx/em28xx-video.c
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c
@@ -29,6 +29,10 @@
#include <linux/i2c.h>
#include <linux/version.h>
#include <linux/video_decoder.h>
+#include "compat.h"
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
+#include <linux/mutex.h>
+#endif
#include "em28xx.h"
#include <media/tuner.h>
@@ -231,7 +235,7 @@ static struct v4l2_queryctrl saa711x_qctrl[] = {
static struct usb_driver em28xx_usb_driver;
-static DECLARE_MUTEX(em28xx_sysfs_lock);
+static DEFINE_MUTEX(em28xx_sysfs_lock);
static DECLARE_RWSEM(em28xx_disconnect);
/********************* v4l2 interface ******************************************/
@@ -475,7 +479,7 @@ static int em28xx_v4l2_open(struct inode *inode, struct file *filp)
*/
static void em28xx_release_resources(struct em28xx *dev)
{
- down(&em28xx_sysfs_lock);
+ mutex_lock(&em28xx_sysfs_lock);
em28xx_info("V4L2 device /dev/video%d deregistered\n",
dev->vdev->minor);
@@ -484,7 +488,7 @@ static void em28xx_release_resources(struct em28xx *dev)
/* video_unregister_device(dev->vbi_dev); */
em28xx_i2c_unregister(dev);
usb_put_dev(dev->udev);
- up(&em28xx_sysfs_lock);
+ mutex_unlock(&em28xx_sysfs_lock);
}
/*