diff options
Diffstat (limited to 'drivers/media/video/videodev.c')
-rw-r--r-- | drivers/media/video/videodev.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c index 2dfa7f23d0ca..cc67ee952838 100644 --- a/drivers/media/video/videodev.c +++ b/drivers/media/video/videodev.c | |||
@@ -1563,10 +1563,6 @@ int video_register_device(struct video_device *vfd, int type, int nr) | |||
1563 | video_device[i]=vfd; | 1563 | video_device[i]=vfd; |
1564 | vfd->minor=i; | 1564 | vfd->minor=i; |
1565 | mutex_unlock(&videodev_lock); | 1565 | mutex_unlock(&videodev_lock); |
1566 | |||
1567 | sprintf(vfd->devfs_name, "v4l/%s%d", name_base, i - base); | ||
1568 | devfs_mk_cdev(MKDEV(VIDEO_MAJOR, vfd->minor), | ||
1569 | S_IFCHR | S_IRUSR | S_IWUSR, vfd->devfs_name); | ||
1570 | mutex_init(&vfd->lock); | 1566 | mutex_init(&vfd->lock); |
1571 | 1567 | ||
1572 | /* sysfs class */ | 1568 | /* sysfs class */ |
@@ -1575,7 +1571,8 @@ int video_register_device(struct video_device *vfd, int type, int nr) | |||
1575 | vfd->class_dev.dev = vfd->dev; | 1571 | vfd->class_dev.dev = vfd->dev; |
1576 | vfd->class_dev.class = &video_class; | 1572 | vfd->class_dev.class = &video_class; |
1577 | vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor); | 1573 | vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor); |
1578 | strlcpy(vfd->class_dev.class_id, vfd->devfs_name + 4, BUS_ID_SIZE); | 1574 | sprintf(vfd->devfs_name, "%s%d", name_base, i - base); |
1575 | strlcpy(vfd->class_dev.class_id, vfd->devfs_name, BUS_ID_SIZE); | ||
1579 | class_device_register(&vfd->class_dev); | 1576 | class_device_register(&vfd->class_dev); |
1580 | class_device_create_file(&vfd->class_dev, | 1577 | class_device_create_file(&vfd->class_dev, |
1581 | &class_device_attr_name); | 1578 | &class_device_attr_name); |