aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/v4l2-dev.c30
-rw-r--r--include/media/v4l2-dev.h6
2 files changed, 0 insertions, 36 deletions
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c
index 8903e41628eb..66bd74b58b06 100644
--- a/drivers/media/video/v4l2-dev.c
+++ b/drivers/media/video/v4l2-dev.c
@@ -141,34 +141,6 @@ static int video_open(struct inode *inode, struct file *file)
141 return err; 141 return err;
142} 142}
143 143
144/*
145 * open/release helper functions -- handle exclusive opens
146 * Should be removed soon
147 */
148int video_exclusive_open(struct inode *inode, struct file *file)
149{
150 struct video_device *vfl = video_devdata(file);
151 int retval = 0;
152
153 mutex_lock(&vfl->lock);
154 if (vfl->users)
155 retval = -EBUSY;
156 else
157 vfl->users++;
158 mutex_unlock(&vfl->lock);
159 return retval;
160}
161EXPORT_SYMBOL(video_exclusive_open);
162
163int video_exclusive_release(struct inode *inode, struct file *file)
164{
165 struct video_device *vfl = video_devdata(file);
166
167 vfl->users--;
168 return 0;
169}
170EXPORT_SYMBOL(video_exclusive_release);
171
172/** 144/**
173 * get_index - assign stream number based on parent device 145 * get_index - assign stream number based on parent device
174 * @vdev: video_device to assign index number to, vdev->dev should be assigned 146 * @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,
320 goto fail_minor; 292 goto fail_minor;
321 } 293 }
322 294
323 mutex_init(&vfd->lock);
324
325 /* sysfs class */ 295 /* sysfs class */
326 memset(&vfd->dev, 0x00, sizeof(vfd->dev)); 296 memset(&vfd->dev, 0x00, sizeof(vfd->dev));
327 vfd->dev.class = &video_class; 297 vfd->dev.class = &video_class;
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index 2745e1afc722..e472b5d07a55 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -77,10 +77,6 @@ struct video_device
77 * Or use {pci|usb}_{get|set}_drvdata() directly. */ 77 * Or use {pci|usb}_{get|set}_drvdata() directly. */
78 void *priv; 78 void *priv;
79#endif 79#endif
80
81 /* for videodev.c internal usage -- please don't touch */
82 int users; /* video_exclusive_{open|close} ... */
83 struct mutex lock; /* ... helper function uses these */
84}; 80};
85 81
86/* Class-dev to video-device */ 82/* Class-dev to video-device */
@@ -111,8 +107,6 @@ static inline void video_set_drvdata(struct video_device *dev, void *data)
111 107
112/* Obsolete stuff - Still needed for radio devices and obsolete drivers */ 108/* Obsolete stuff - Still needed for radio devices and obsolete drivers */
113extern struct video_device* video_devdata(struct file*); 109extern struct video_device* video_devdata(struct file*);
114extern int video_exclusive_open(struct inode *inode, struct file *file);
115extern int video_exclusive_release(struct inode *inode, struct file *file);
116#endif 110#endif
117 111
118#endif /* _V4L2_DEV_H */ 112#endif /* _V4L2_DEV_H */