|
@@ -141,34 +141,6 @@ static int video_open(struct inode *inode, struct file *file)
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
- * open/release helper functions -- handle exclusive opens
|
|
|
|
- * Should be removed soon
|
|
|
|
- */
|
|
|
|
-int video_exclusive_open(struct inode *inode, struct file *file)
|
|
|
|
-{
|
|
|
|
- struct video_device *vfl = video_devdata(file);
|
|
|
|
- int retval = 0;
|
|
|
|
-
|
|
|
|
- mutex_lock(&vfl->lock);
|
|
|
|
- if (vfl->users)
|
|
|
|
- retval = -EBUSY;
|
|
|
|
- else
|
|
|
|
- vfl->users++;
|
|
|
|
- mutex_unlock(&vfl->lock);
|
|
|
|
- return retval;
|
|
|
|
-}
|
|
|
|
-EXPORT_SYMBOL(video_exclusive_open);
|
|
|
|
-
|
|
|
|
-int video_exclusive_release(struct inode *inode, struct file *file)
|
|
|
|
-{
|
|
|
|
- struct video_device *vfl = video_devdata(file);
|
|
|
|
-
|
|
|
|
- vfl->users--;
|
|
|
|
- return 0;
|
|
|
|
-}
|
|
|
|
-EXPORT_SYMBOL(video_exclusive_release);
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* get_index - assign stream number based on parent device
|
|
* get_index - assign stream number based on parent device
|
|
* @vdev: video_device to assign index number to, vdev->dev should be assigned
|
|
* @vdev: video_device to assign index number to, vdev->dev should be assigned
|
|
@@ -320,8 +292,6 @@ int video_register_device_index(struct video_device *vfd, int type, int nr,
|
|
goto fail_minor;
|
|
goto fail_minor;
|
|
}
|
|
}
|
|
|
|
|
|
- mutex_init(&vfd->lock);
|
|
|
|
-
|
|
|
|
/* sysfs class */
|
|
/* sysfs class */
|
|
memset(&vfd->dev, 0x00, sizeof(vfd->dev));
|
|
memset(&vfd->dev, 0x00, sizeof(vfd->dev));
|
|
vfd->dev.class = &video_class;
|
|
vfd->dev.class = &video_class;
|