lkml.org 
[lkml]   [2002]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Serial Driver Name Question (kernels 2.4.x)
David Weinehall wrote:
>
> On Mon, Jan 07, 2002 at 09:03:35PM -0800, Andrew Morton wrote:
> > [ tty driver name breakage ]
> >
> > Richard, can we please get this wrapped up?
> >
> > My preferred approach is to change the driver naming scheme
> > so that we don't have to put printf control-strings everywhere.
> > We can remove a number of ifdefs that way.
>
> Wouldn't it be cleaner to have:
>
> #ifdef CONFIG_DEVFS_FS
> serial_driver.name = "tts/";
> #else
> serial_driver.name = "tts";
> #endif
>
> and
>
> sprintf("buf, "%s%d", name, idx + tty->driver.name_base);
>
> respectively?!
>

Well, with the scheme I proposed most drivers won't need the
ifdef. It'll just be:

serial_driver.name = "cua";

With devfs enabled that expands to cua/42. Without devfs it expands
to cua42.

Seems that some drivers have had their name changed when used under
devfs (tts/%d versus ttyS%d). But a lot have not.

-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:15    [W:0.186 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site