Re: PATCH: Update for the serial driver.

Theodore Y. Ts'o (tytso@mit.edu)
Wed, 1 Sep 1999 10:02:26 -0400


Date: Wed, 1 Sep 1999 10:13:36 +0200 (MEST)
From: R.E.Wolff@BitWizard.nl (Rogier Wolff)

> +static int tty_get_baud_rate(struct tty_struct *tty)

Could you PLEASE, make that a published, exported function? That would
be really nice. Nowadays every serial driver does this for himself.

It has been a published, exported function since 2.1.66; the code which
you're quoting from the serial driver is compatibility code which is
under a "#if (LINUX_VERSION_CODE < 131394)". Each serial driver should
*not* be doing itself, but should be using tty_get_baud_rate() (defined
in drivers/char/tty_io.c) instead. It's even published in /proc/ksyms
so that modular drivers can use it.

(The reason why the compatibility code is there is because the serial
driver is also available as a stand-alone module, so that people using
older kernels and who needed support for newer UART's could use the
serial driver without being forced to upgrade to development kernels.)

- Ted

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