summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2003-04-29 19:45:56 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-04-29 19:45:56 -0700
commitca117b171bca43fa1ddc9a2edbb0e52f59f27589 (patch)
tree45daf6d783db419f325c2256afc5192c67df136f
parentcbfce4a98869e2bde1f4a51a74aedc55ae471f0f (diff)
[PATCH] remove devfs hack from misc_register
There's an (fortunately unused) devfs in misc_register currently, when the name of the miscdevice contains a slash the name is used as devfs name instead of misc/<name>. Kill if as we have .devfs_name for this kind of stuff now.
-rw-r--r--drivers/char/misc.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/char/misc.c b/drivers/char/misc.c
index e7144be4ef79..1e1126d91fe8 100644
--- a/drivers/char/misc.c
+++ b/drivers/char/misc.c
@@ -192,21 +192,12 @@ int misc_register(struct miscdevice * misc)
}
misc->minor = i;
}
+
if (misc->minor < DYNAMIC_MINORS)
misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7);
-
-
- /*
- * please use it if you want to do fancy things with your
- * name...
- */
if (misc->devfs_name[0] == '\0') {
- /* yuck, yet another stupid special-casing.
- whos actually using this? Please switch over
- to ->devfs_name ASAP */
snprintf(misc->devfs_name, sizeof(misc->devfs_name),
- strchr(misc->name, '/') ?
- "%s" : "misc/%s", misc->name);
+ "misc/%s", misc->name);
}
devfs_register(NULL, misc->devfs_name, 0, MISC_MAJOR, misc->minor,