* [PATCH] use tty_driver.name as default .devfs_name
@ 2003-06-15 20:02 Roman Kagan
0 siblings, 0 replies; only message in thread
From: Roman Kagan @ 2003-06-15 20:02 UTC (permalink / raw)
To: linux-kernel
Hi,
In 2.5.71 with devfs enabled my USB modem appears as /dev/<NULL>0
instead of the usual /dev/usb/acm/0. I tracked down this problem to be
due to
ChangeSet@1.1215.98.11 2003-06-06 08:54:35-07:00 akpm@digeo.com
(originally "[PATCH] Fix tty devfs mess" from Christoph Hellwig
<hch@lst.de>)
where a new .devfs_name field was introduced in struct tty_driver.
However, many drivers (including cdc-acm) haven't been updated to define
it. OTOH they seem to be quite happy using their .name for devfs as
well. This patch makes .name the default .devfs_name. Since
tty_{,un}register_device() appear to be the only users of .devfs_name,
there should be no side effects. WFM. Please consider applying.
Roman.
--- linux-2.5.71/drivers/char/tty_io.c~ 2003-06-14 23:18:23.000000000 +0400
+++ linux-2.5.71/drivers/char/tty_io.c 2003-06-15 22:20:51.000000000 +0400
@@ -2183,6 +2183,10 @@
return;
}
+ /* Use driver name for devfs as well */
+ if (!driver->devfs_name)
+ driver->devfs_name = driver->name;
+
devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR,
"%s%d", driver->devfs_name, index + driver->name_base);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-06-15 19:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-15 20:02 [PATCH] use tty_driver.name as default .devfs_name Roman Kagan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).