summaryrefslogtreecommitdiff
path: root/include/linux/serial_core.h
diff options
context:
space:
mode:
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>2003-04-24 08:38:39 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-04-24 08:38:39 -0700
commit4310d2e1ef9d2fa109ee2b6a01cf47e81acc3432 (patch)
tree1502bca99251d19704f6006f4ce11a2aeddf1fc0 /include/linux/serial_core.h
parentb7d752fb6dc63357ed6673181a8afd4b169488df (diff)
[PATCH] console cleanup (2/2)
Console drivers cleanup. In current tree interaction between console and tty layer sits in the ->device() method of struct console. It takes a pointer to console and returns device number of its tty device. open(2) on /dev/console goes through the list of registered consoles, picks the first one that has ->device() and remaps the device number to console->device(console). Then it proceeds with normal opening of tty. This is the only caller of ->device(). Cleanup: let ->device() return a pair (pointer to tty_driver, index of tty in question) instead of device number. Note that a) the first thing tty_open() does with remapped device number is conversion to such pair. b) console driver _knows_ which tty_driver we want - one that implements tty interface to the same physical device (i.e. the part of the same driver). c) current code expects the result of ->device() to be a device number of tty device - anything else is immediate -ENODEV from tty_open(); might as well have NULL ->device in that driver. Console drivers converted, (the only) caller updated.
Diffstat (limited to 'include/linux/serial_core.h')
-rw-r--r--include/linux/serial_core.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index d3963ee21876..8ac09f62af56 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -300,7 +300,7 @@ void uart_parse_options(char *options, int *baud, int *parity, int *bits,
int *flow);
int uart_set_options(struct uart_port *port, struct console *co, int baud,
int parity, int bits, int flow);
-kdev_t uart_console_device(struct console *co);
+struct tty_driver *uart_console_device(struct console *co, int *index);
/*
* Port/driver registration/removal