lkml.org 
[lkml]   [2002]   [Jan]   [3]   [last100]   RSS-feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Complete thread (EXPERIMENTAL)
/
DateWed, 02 Jan 2002 23:03:38 -0800
FromAndrew Morton <>
SubjectRe: Serial Driver Name Question (kernels 2.4.x)
Digg This
Richard Gooch wrote:

Instead, it appears that someone broke tty_name(). Here's the 2.2 kernel's version:

That "someone" was me, and I changed it from broken to fixed.

Look at serial.c:

#if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS))
        serial_driver.name = "tts/%d";
#else
        serial_driver.name = "ttyS";
#endif
tty_name will just print "ttyS". So the transition for this case was fixed->broken.


No, originally tty_name() did it, and then I shifted it to the drivers. I don't recall the reason, but it was necessary. So I don't want this changed.

Oh dear. Why cannot devfs expand the minor part itself?
It looks like all the drivers need to be given a %d, as Ivan suggests. And we need to audit all uses to make sure nobody is doing printk(driver.name);
I think it would be better to drop the printf control construct from the names altogether.

\
ISP Services
Valid XHTML 1.0!\ /
Valid CSS! Last update: 2005-03-22 12:15    [W:1.005 / U:0.650 seconds]
©2003-2005 Jasper Spaans