From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: torvalds@osdl.org, Russell King <rmk+lkml@arm.linux.org.uk>,
linux-kernel@vger.kernel.org
Subject: [PATCH] Fix tty drivers which dont set tty_driver->devfs_name
Date: Fri, 27 Feb 2004 19:22:42 -0300 (BRT) [thread overview]
Message-ID: <Pine.LNX.4.58L.0402271912430.19454@logos.cnet> (raw)
In-Reply-To: <20040227204817.A4877@infradead.org>
> No, fix the drivers instead.
Agreed.
The following patches fixes tty drivers which dont set devfs_name. Not
doing so will cause the tty layer to create "/dev/<NULL>x" entries when
devfs is being used.
I used "drivername/" in isicom and pcxe because the letter used to
identify them are already used by other drivers.
Please apply.
diff -Nur linux-2.6.3.orig/drivers/char/cyclades.c linux-2.6.3-devfs/drivers/char/cyclades.c
--- linux-2.6.3.orig/drivers/char/cyclades.c 2004-02-24 17:51:48.000000000 -0300
+++ linux-2.6.3-devfs/drivers/char/cyclades.c 2004-02-27 19:12:22.812325016 -0300
@@ -5452,6 +5452,7 @@
cy_serial_driver->owner = THIS_MODULE;
cy_serial_driver->driver_name = "cyclades";
cy_serial_driver->name = "ttyC";
+ cy_serial_driver->devfs_name = "tts/C";
cy_serial_driver->major = CYCLADES_MAJOR;
cy_serial_driver->minor_start = 0;
cy_serial_driver->type = TTY_DRIVER_TYPE_SERIAL;
diff -Nur linux-2.6.3.orig/drivers/char/epca.c linux-2.6.3-devfs/drivers/char/epca.c
--- linux-2.6.3.orig/drivers/char/epca.c 2004-02-24 17:51:49.000000000 -0300
+++ linux-2.6.3-devfs/drivers/char/epca.c 2004-02-27 19:02:04.632302664 -0300
@@ -1644,6 +1644,7 @@
pc_driver->owner = THIS_MODULE;
pc_driver->name = "ttyD";
+ pc_driver->devfs_name = "tts/D";
pc_driver->major = DIGI_MAJOR;
pc_driver->minor_start = 0;
pc_driver->type = TTY_DRIVER_TYPE_SERIAL;
diff -Nur linux-2.6.3.orig/drivers/char/esp.c linux-2.6.3-devfs/drivers/char/esp.c
--- linux-2.6.3.orig/drivers/char/esp.c 2004-02-24 17:51:48.000000000 -0300
+++ linux-2.6.3-devfs/drivers/char/esp.c 2004-02-27 19:02:54.077785808 -0300
@@ -2498,6 +2498,7 @@
esp_driver->owner = THIS_MODULE;
esp_driver->name = "ttyP";
+ esp_driver->devfs_name = "tts/P";
esp_driver->major = ESP_IN_MAJOR;
esp_driver->minor_start = 0;
esp_driver->type = TTY_DRIVER_TYPE_SERIAL;
diff -Nur linux-2.6.3.orig/drivers/char/isicom.c linux-2.6.3-devfs/drivers/char/isicom.c
--- linux-2.6.3.orig/drivers/char/isicom.c 2004-02-24 17:51:48.000000000 -0300
+++ linux-2.6.3-devfs/drivers/char/isicom.c 2004-02-27 19:05:07.553494416 -0300
@@ -1653,6 +1653,7 @@
isicom_normal->owner = THIS_MODULE;
isicom_normal->name = "ttyM";
+ isicom_normal->devfs_name = "isicom/";
isicom_normal->major = ISICOM_NMAJOR;
isicom_normal->minor_start = 0;
isicom_normal->type = TTY_DRIVER_TYPE_SERIAL;
diff -Nur linux-2.6.3.orig/drivers/char/moxa.c linux-2.6.3-devfs/drivers/char/moxa.c
--- linux-2.6.3.orig/drivers/char/moxa.c 2004-02-24 17:51:49.000000000 -0300
+++ linux-2.6.3-devfs/drivers/char/moxa.c 2004-02-27 19:05:55.203250552 -0300
@@ -304,6 +304,7 @@
init_MUTEX(&moxaBuffSem);
moxaDriver->owner = THIS_MODULE;
moxaDriver->name = "ttya";
+ moxaDriver->devfs_name = "tts/a";
moxaDriver->major = ttymajor;
moxaDriver->minor_start = 0;
moxaDriver->type = TTY_DRIVER_TYPE_SERIAL;
diff -Nur linux-2.6.3.orig/drivers/char/pcxx.c linux-2.6.3-devfs/drivers/char/pcxx.c
--- linux-2.6.3.orig/drivers/char/pcxx.c 2004-02-24 17:51:49.000000000 -0300
+++ linux-2.6.3-devfs/drivers/char/pcxx.c 2004-02-27 19:09:55.318747448 -0300
@@ -1145,6 +1145,7 @@
pcxe_driver->owner = THIS_MODULE;
pcxe_driver->name = "ttyD";
+ pcxe_driver->devfs_name = "pcxe/";
pcxe_driver->major = DIGI_MAJOR;
pcxe_driver->minor_start = 0;
pcxe_driver->type = TTY_DRIVER_TYPE_SERIAL;
diff -Nur linux-2.6.3.orig/drivers/char/riscom8.c linux-2.6.3-devfs/drivers/char/riscom8.c
--- linux-2.6.3.orig/drivers/char/riscom8.c 2004-02-24 17:51:49.000000000 -0300
+++ linux-2.6.3-devfs/drivers/char/riscom8.c 2004-02-27 19:11:24.860135088 -0300
@@ -1696,6 +1696,7 @@
memset(IRQ_to_board, 0, sizeof(IRQ_to_board));
riscom_driver->owner = THIS_MODULE;
riscom_driver->name = "ttyL";
+ riscom_driver->devfs_name = "tts/L";
riscom_driver->major = RISCOM8_NORMAL_MAJOR;
riscom_driver->type = TTY_DRIVER_TYPE_SERIAL;
riscom_driver->subtype = SERIAL_TYPE_NORMAL;
prev parent reply other threads:[~2004-02-27 21:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-27 21:36 [PATCH] tty_io: Do not register NULL /dev entries on devfs Marcelo Tosatti
2004-02-27 20:48 ` Christoph Hellwig
2004-02-27 22:22 ` Marcelo Tosatti [this message]
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=Pine.LNX.4.58L.0402271912430.19454@logos.cnet \
--to=marcelo.tosatti@cyclades.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+lkml@arm.linux.org.uk \
--cc=torvalds@osdl.org \
/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®