| Age | Commit message (Collapse) | Author |
|
Instead, tty_io.c will always copy user space data to
kernel space, leaving the drivers to worry only about
normal kernel buffers.
No more "from_user" flag, and having the user copy in
each driver.
This cleans up the code and also fixes a number of
locking bugs.
|
|
Made ->write_proc in tty_driver suitable for procfs write callback
|
|
From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
The callout code has been removed long ago from 2.6. I believe it is safe
to remove some of its unused defines.
|
|
From: "H. Peter Anvin" <hpa@transmeta.com>
Remove the limit of 2048 pty's - allocate them on demand up to the 12:20
dev_t limit: a million.
|
|
added helper functions for allocation and freeing tty_driver
|
|
->table[], ->termios[] and ->locked_termios[] allocated dynamically
in tty_register_driver() and freed in tty_unregister_driver(). Per-driver
arrays gone.
|
|
->refcount switched from int * to int. Per-driver variables gone since we had
switched from int foo = 0; driver.refcount = &foo; to driver.refcount = 0;
|
|
From: Christoph Hellwig <hch@lst.de>
Currently the tty code abuses tty_driver.name as the prefix for the devfs
names of the ttys. This is a very bad idea because it means the tty name
changes depending on whether devfs is enabled or not, leading to different
names in /proc/tty/ depending on whether we have devfs or not (and not
whether it actually is mounted!) and a huge amount of ifdefs.
The patch below adds a .devfs_name member instead, similar to the block
device changes a few weeks ago.
|
|
New object: struct cdev. It contains a kobject, a pointer to
file_operations and a pointer to owner module. These guys have a search
structure of the same sort as gendisks and chrdev_open() picks
file_operations from them.
Intended use: embed such animal in driver-owned structure (e.g.
tty_driver) and register it as associated with given range of device
numbers. Generic code will do lookup for such object and use it for the
rest.
The behaviour of register_chrdev() is _not_ changed - it allocates
struct cdev and registers it; any old driver will work as if nothing had
changed.
On that stage we only use it during chrdev_open() to find
file_operations. Later it will be cached in inode->i_cdev (and index in
range - in inode->i_cindex) so that ->open() could get whatever objects
it wants directly without any special-cased lookups, etc.
|
|
Note, tty_class will be flushed out in the future, this is just to
get things building again properly.
|
|
We also parse modem control signals in the tty layer, and fail with
EINVAL if the driver does not provide the methods. All tty drivers
which require modem control support should be updated to provide
the new tiocmset and tiocmget methods.
|
|
Note, there are still races with unloading modules, this patch
does not fix that...
|
|
|
|
Convert the tty_drivers list to use list_heads instead of open coded
doubly-linked lists.
|
|
|