Re: Serial Driver Name Question (kernels 2.4.x)

Andrew Morton
2002-01-08T06:28:51Z

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.

-