[PATCH] devfs: Remove devfs_mk_cdev() function from the kernel tree
[firefly-linux-kernel-4.4.55.git] / drivers / media / video / videodev.c
index 2dfa7f23d0ca28f7e08a2fa7167184789c32cc29..cc67ee9528386ec507f5724df77515eb52ed5f40 100644 (file)
@@ -1563,10 +1563,6 @@ int video_register_device(struct video_device *vfd, int type, int nr)
        video_device[i]=vfd;
        vfd->minor=i;
        mutex_unlock(&videodev_lock);
-
-       sprintf(vfd->devfs_name, "v4l/%s%d", name_base, i - base);
-       devfs_mk_cdev(MKDEV(VIDEO_MAJOR, vfd->minor),
-                       S_IFCHR | S_IRUSR | S_IWUSR, vfd->devfs_name);
        mutex_init(&vfd->lock);
 
        /* sysfs class */
@@ -1575,7 +1571,8 @@ int video_register_device(struct video_device *vfd, int type, int nr)
                vfd->class_dev.dev = vfd->dev;
        vfd->class_dev.class       = &video_class;
        vfd->class_dev.devt        = MKDEV(VIDEO_MAJOR, vfd->minor);
-       strlcpy(vfd->class_dev.class_id, vfd->devfs_name + 4, BUS_ID_SIZE);
+       sprintf(vfd->devfs_name, "%s%d", name_base, i - base);
+       strlcpy(vfd->class_dev.class_id, vfd->devfs_name, BUS_ID_SIZE);
        class_device_register(&vfd->class_dev);
        class_device_create_file(&vfd->class_dev,
                                &class_device_attr_name);