Commit 4977d1c6 authored by Christoph Hellwig's avatar Christoph Hellwig

[PATCH] devfs: videodev

parent e8095bf2
......@@ -375,7 +375,6 @@ int video_register_device(struct video_device *vfd, int type, int nr)
int base;
int end;
char *name_base;
char name[16];
switch(type)
{
......@@ -426,19 +425,19 @@ int video_register_device(struct video_device *vfd, int type, int nr)
vfd->minor=i;
up(&videodev_lock);
sprintf (name, "v4l/%s%d", name_base, i - base);
vfd->devfs_handle =
devfs_register (NULL, name, DEVFS_FL_DEFAULT,
VIDEO_MAJOR, vfd->minor,
S_IFCHR | S_IRUSR | S_IWUSR,
&video_fops,
NULL);
sprintf(vfd->devfs_name, "v4l/%s%d", name_base, i - base);
devfs_register(NULL, vfd->devfs_name, 0, VIDEO_MAJOR, vfd->minor,
S_IFCHR | S_IRUSR | S_IWUSR, &video_fops, NULL);
init_MUTEX(&vfd->lock);
#ifdef CONFIG_VIDEO_PROC_FS
sprintf (name, "%s%d", name_base, i - base);
videodev_proc_create_dev (vfd, name);
{
char name[16];
sprintf(name, "%s%d", name_base, i - base);
videodev_proc_create_dev(vfd, name);
}
#endif
return 0;
}
......@@ -460,7 +459,7 @@ void video_unregister_device(struct video_device *vfd)
videodev_proc_destroy_dev (vfd);
#endif
devfs_unregister (vfd->devfs_handle);
devfs_remove(vfd->devfs_name);
video_device[vfd->minor]=NULL;
up(&videodev_lock);
}
......
......@@ -39,7 +39,7 @@ struct video_device
/* for videodev.c intenal usage -- don't touch */
int users;
struct semaphore lock;
devfs_handle_t devfs_handle;
char devfs_name[64]; /* devfs */
};
#define VIDEO_MAJOR 81
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment