mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: torvalds@transmeta.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] remove devfs hack from misc_register
Date: Wed, 30 Apr 2003 18:27:24 +0200	[thread overview]
Message-ID: <20030430182724.A4681@lst.de> (raw)

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.


--- 1.17/drivers/char/misc.c	Sat Apr 19 11:56:45 2003
+++ edited/drivers/char/misc.c	Wed Apr 30 18:01:16 2003
@@ -192,21 +192,12 @@
 		}
 		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,

                 reply	other threads:[~2003-04-30 16:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030430182724.A4681@lst.de \
    --to=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®