mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 21:21:09 +00:00
tty: Clean up the tty_init_dev changes further
Fix up the naming, style and extract some bits of code into the driver specific code Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
2349970575
commit
99f1fe189d
3 changed files with 81 additions and 41 deletions
|
@ -7,6 +7,14 @@
|
|||
* defined; unless noted otherwise, they are optional, and can be
|
||||
* filled in with a null pointer.
|
||||
*
|
||||
* struct tty_struct * (*lookup)(struct tty_driver *self, int idx)
|
||||
*
|
||||
* Return the tty device corresponding to idx, NULL if there is not
|
||||
* one currently in use and an ERR_PTR value on error. Called under
|
||||
* tty_mutex (for now!)
|
||||
*
|
||||
* Optional method. Default behaviour is to use the ttys array
|
||||
*
|
||||
* int (*open)(struct tty_struct * tty, struct file * filp);
|
||||
*
|
||||
* This routine is called when a particular tty device is opened.
|
||||
|
@ -203,6 +211,7 @@ struct tty_struct;
|
|||
struct tty_driver;
|
||||
|
||||
struct tty_operations {
|
||||
struct tty_struct * (*lookup)(struct tty_driver *driver, int idx);
|
||||
int (*open)(struct tty_struct * tty, struct file * filp);
|
||||
void (*close)(struct tty_struct * tty, struct file * filp);
|
||||
void (*shutdown)(struct tty_struct *tty);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue