Update of /cvsroot/linuxconsole/ruby/linux/drivers/char
In directory usw-pr-cvs1:/tmp/cvs-serv29209/linux/drivers/char
Modified Files:
misc.c
Log Message:
Synced to 2.5.16
Index: misc.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/misc.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- misc.c 20 Jan 2002 03:54:46 -0000 1.17
+++ misc.c 21 May 2002 04:06:05 -0000 1.18
@@ -166,7 +166,7 @@
int misc_register(struct miscdevice * misc)
{
- static devfs_handle_t devfs_handle;
+ static devfs_handle_t devfs_handle, dir;
struct miscdevice *c;
if (misc->next || misc->prev)
@@ -197,11 +197,12 @@
misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7);
if (!devfs_handle)
devfs_handle = devfs_mk_dir (NULL, "misc", NULL);
+ dir = strchr (misc->name, '/') ? NULL : devfs_handle;
misc->devfs_handle =
- devfs_register (devfs_handle, misc->name, DEVFS_FL_NONE,
- MISC_MAJOR, misc->minor,
- S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP,
- misc->fops, NULL);
+ devfs_register (dir, misc->name, DEVFS_FL_NONE,
+ MISC_MAJOR, misc->minor,
+ S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP,
+ misc->fops, NULL);
/*
* Add it to the front, so that later devices can "override"
|