aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/videodev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/videodev.c')
-rw-r--r--drivers/media/video/videodev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index 908fbec776ac..75e3d41382f2 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -224,13 +224,13 @@ int video_exclusive_open(struct inode *inode, struct file *file)
224 struct video_device *vfl = video_devdata(file); 224 struct video_device *vfl = video_devdata(file);
225 int retval = 0; 225 int retval = 0;
226 226
227 down(&vfl->lock); 227 mutex_lock(&vfl->lock);
228 if (vfl->users) { 228 if (vfl->users) {
229 retval = -EBUSY; 229 retval = -EBUSY;
230 } else { 230 } else {
231 vfl->users++; 231 vfl->users++;
232 } 232 }
233 up(&vfl->lock); 233 mutex_unlock(&vfl->lock);
234 return retval; 234 return retval;
235} 235}
236 236
@@ -328,7 +328,7 @@ int video_register_device(struct video_device *vfd, int type, int nr)
328 sprintf(vfd->devfs_name, "v4l/%s%d", name_base, i - base); 328 sprintf(vfd->devfs_name, "v4l/%s%d", name_base, i - base);
329 devfs_mk_cdev(MKDEV(VIDEO_MAJOR, vfd->minor), 329 devfs_mk_cdev(MKDEV(VIDEO_MAJOR, vfd->minor),
330 S_IFCHR | S_IRUSR | S_IWUSR, vfd->devfs_name); 330 S_IFCHR | S_IRUSR | S_IWUSR, vfd->devfs_name);
331 init_MUTEX(&vfd->lock); 331 mutex_init(&vfd->lock);
332 332
333 /* sysfs class */ 333 /* sysfs class */
334 memset(&vfd->class_dev, 0x00, sizeof(vfd->class_dev)); 334 memset(&vfd->class_dev, 0x00, sizeof(vfd->class_dev));