diff options
author | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 05:02:08 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 05:02:08 -0500 |
commit | 5501972e0b5857bc8354770d900ceb9b40c7f6b7 (patch) | |
tree | ff239422827c4cd54d2998f8851304255de31b38 /drivers/media/video/videodev.c | |
parent | 9d2f928ddf64ca0361562e30faf584cd33055c60 (diff) | |
parent | e952f31bce6e9f64db01f607abc46529ba57ac9e (diff) |
Merge with rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/media/video/videodev.c')
-rw-r--r-- | drivers/media/video/videodev.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c index 078880e4c8c0..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 | ||
@@ -279,23 +279,23 @@ int video_register_device(struct video_device *vfd, int type, int nr) | |||
279 | switch(type) | 279 | switch(type) |
280 | { | 280 | { |
281 | case VFL_TYPE_GRABBER: | 281 | case VFL_TYPE_GRABBER: |
282 | base=0; | 282 | base=MINOR_VFL_TYPE_GRABBER_MIN; |
283 | end=64; | 283 | end=MINOR_VFL_TYPE_GRABBER_MAX+1; |
284 | name_base = "video"; | 284 | name_base = "video"; |
285 | break; | 285 | break; |
286 | case VFL_TYPE_VTX: | 286 | case VFL_TYPE_VTX: |
287 | base=192; | 287 | base=MINOR_VFL_TYPE_VTX_MIN; |
288 | end=224; | 288 | end=MINOR_VFL_TYPE_VTX_MAX+1; |
289 | name_base = "vtx"; | 289 | name_base = "vtx"; |
290 | break; | 290 | break; |
291 | case VFL_TYPE_VBI: | 291 | case VFL_TYPE_VBI: |
292 | base=224; | 292 | base=MINOR_VFL_TYPE_VBI_MIN; |
293 | end=256; | 293 | end=MINOR_VFL_TYPE_VBI_MAX+1; |
294 | name_base = "vbi"; | 294 | name_base = "vbi"; |
295 | break; | 295 | break; |
296 | case VFL_TYPE_RADIO: | 296 | case VFL_TYPE_RADIO: |
297 | base=64; | 297 | base=MINOR_VFL_TYPE_RADIO_MIN; |
298 | end=128; | 298 | end=MINOR_VFL_TYPE_RADIO_MAX+1; |
299 | name_base = "radio"; | 299 | name_base = "radio"; |
300 | break; | 300 | break; |
301 | default: | 301 | default: |
@@ -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)); |