mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Fulghum <paulkf@microgate.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Greg Kroah-Hartman <greg@kroah.com>,
	"torvalds@transmeta.com" <torvalds@transmeta.com>
Subject: [PATCH] 2.5.70 tty_register_driver
Date: 29 May 2003 09:27:28 -0500	[thread overview]
Message-ID: <1054218448.2099.5.camel@diemos> (raw)
In-Reply-To: <1054150058.2025.18.camel@diemos>

This patch corrects changes made in 2.5.70 to
tty_register_device() which caused the device
minor base specified by tty drivers using dynamically
allocated device major number to be ignored.

I have posted to lkml and to the originator of the
2.5.70 patch, and have received no dissenting views.

Please apply.

--- linux-2.5.70/drivers/char/tty_io.c	2003-05-29 09:14:30.000000000 -0500
+++ linux-2.5.70-mg/drivers/char/tty_io.c	2003-05-29 08:24:41.000000000 -0500
@@ -2255,7 +2255,7 @@
 		return 0;
 
 	if (!driver->major) {
-		error = alloc_chrdev_region(&dev, driver->num,
+		error = alloc_chrdev_region(&dev, driver->minor_start, driver->num,
 						(char*)driver->name);
 		if (!error) {
 			driver->major = MAJOR(dev);
--- linux-2.5.70/include/linux/fs.h	2003-05-29 09:14:01.000000000 -0500
+++ linux-2.5.70-mg/include/linux/fs.h	2003-05-29 08:23:46.000000000 -0500
@@ -1059,7 +1059,7 @@
 extern void blk_run_queues(void);
 
 /* fs/char_dev.c */
-extern int alloc_chrdev_region(dev_t *, unsigned, char *);
+extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, char *);
 extern int register_chrdev_region(dev_t, unsigned, char *);
 extern int register_chrdev(unsigned int, const char *,
 			   struct file_operations *);
--- linux-2.5.70/fs/char_dev.c	2003-05-29 09:14:18.000000000 -0500
+++ linux-2.5.70-mg/fs/char_dev.c	2003-05-29 08:24:25.000000000 -0500
@@ -177,10 +177,10 @@
 	return PTR_ERR(cd);
 }
 
-int alloc_chrdev_region(dev_t *dev, unsigned count, char *name)
+int alloc_chrdev_region(dev_t *dev, unsigned baseminor, unsigned count, char *name)
 {
 	struct char_device_struct *cd;
-	cd = __register_chrdev_region(0, 0, count, name);
+	cd = __register_chrdev_region(0, baseminor, count, name);
 	if (IS_ERR(cd))
 		return PTR_ERR(cd);
 	*dev = MKDEV(cd->major, cd->baseminor);




-- 
Paul Fulghum, paulkf@microgate.com
Microgate Corporation, http://www.microgate.com



  reply	other threads:[~2003-05-29 14:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-28 16:09 [BUG] " Paul Fulghum
2003-05-28 19:27 ` Paul Fulghum
2003-05-29 14:27   ` Paul Fulghum [this message]
2003-05-29 16:56     ` [PATCH] " Greg KH
2003-05-29 17:27       ` Paul Fulghum

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=1054218448.2099.5.camel@diemos \
    --to=paulkf@microgate.com \
    --cc=greg@kroah.com \
    --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®