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

Andrew Morton (akpm@zip.com.au)
Mon, 07 Jan 2002 22:23:04 -0800


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/