summaryrefslogtreecommitdiff
path: root/kernel
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 /kernel
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 'kernel')
0 files changed, 0 insertions, 0 deletions