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.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index 2dfa7f23d0ca..b26ebaff226f 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -37,7 +37,6 @@
37#include <linux/init.h> 37#include <linux/init.h>
38#include <linux/kmod.h> 38#include <linux/kmod.h>
39#include <linux/slab.h> 39#include <linux/slab.h>
40#include <linux/devfs_fs_kernel.h>
41#include <asm/uaccess.h> 40#include <asm/uaccess.h>
42#include <asm/system.h> 41#include <asm/system.h>
43 42
@@ -1563,10 +1562,6 @@ int video_register_device(struct video_device *vfd, int type, int nr)
1563 video_device[i]=vfd; 1562 video_device[i]=vfd;
1564 vfd->minor=i; 1563 vfd->minor=i;
1565 mutex_unlock(&videodev_lock); 1564 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); 1565 mutex_init(&vfd->lock);
1571 1566
1572 /* sysfs class */ 1567 /* sysfs class */
@@ -1575,7 +1570,7 @@ int video_register_device(struct video_device *vfd, int type, int nr)
1575 vfd->class_dev.dev = vfd->dev; 1570 vfd->class_dev.dev = vfd->dev;
1576 vfd->class_dev.class = &video_class; 1571 vfd->class_dev.class = &video_class;
1577 vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor); 1572 vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor);
1578 strlcpy(vfd->class_dev.class_id, vfd->devfs_name + 4, BUS_ID_SIZE); 1573 sprintf(vfd->class_dev.class_id, "%s%d", name_base, i - base);
1579 class_device_register(&vfd->class_dev); 1574 class_device_register(&vfd->class_dev);
1580 class_device_create_file(&vfd->class_dev, 1575 class_device_create_file(&vfd->class_dev,
1581 &class_device_attr_name); 1576 &class_device_attr_name);
@@ -1604,7 +1599,6 @@ void video_unregister_device(struct video_device *vfd)
1604 if(video_device[vfd->minor]!=vfd) 1599 if(video_device[vfd->minor]!=vfd)
1605 panic("videodev: bad unregister"); 1600 panic("videodev: bad unregister");
1606 1601
1607 devfs_remove(vfd->devfs_name);
1608 video_device[vfd->minor]=NULL; 1602 video_device[vfd->minor]=NULL;
1609 class_device_unregister(&vfd->class_dev); 1603 class_device_unregister(&vfd->class_dev);
1610 mutex_unlock(&videodev_lock); 1604 mutex_unlock(&videodev_lock);