diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2006-12-08 05:38:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:28:57 -0500 |
commit | 606d099cdd1080bbb50ea50dc52d98252f8f10a1 (patch) | |
tree | 80d17450a5fb78effce3f4312f672c058658e004 /include | |
parent | edc6afc5496875a640bef0913604be7550c1795d (diff) |
[PATCH] tty: switch to ktermios
This is the grungy swap all the occurrences in the right places patch that
goes with the updates. At this point we have the same functionality as
before (except that sgttyb() returns speeds not zero) and are ready to
begin turning new stuff on providing nobody reports lots of bugs
If you are a tty driver author converting an out of tree driver the only
impact should be termios->ktermios name changes for the speed/property
setting functions from your upper layers.
If you are implementing your own TCGETS function before then your driver
was broken already and its about to get a whole lot more painful for you so
please fix it 8)
Also fill in c_ispeed/ospeed on init for most devices, although the current
code will do this for you anyway but I'd like eventually to lose that extra
paranoia
[akpm@osdl.org: bluetooth fix]
[mp3@de.ibm.com: sclp fix]
[mp3@de.ibm.com: warning fix for tty3270]
[hugh@veritas.com: fix tty_ioctl powerpc build]
[jdike@addtoit.com: uml: fix ->set_termios declaration]
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Acked-by: Peter Oberparleiter <oberpar@de.ibm.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/termios.h | 4 | ||||
-rw-r--r-- | include/asm-powerpc/termbits.h | 2 | ||||
-rw-r--r-- | include/linux/generic_serial.h | 2 | ||||
-rw-r--r-- | include/linux/isdn.h | 8 | ||||
-rw-r--r-- | include/linux/serial_core.h | 8 | ||||
-rw-r--r-- | include/linux/usb/serial.h | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/include/asm-generic/termios.h b/include/asm-generic/termios.h index 1e58ca39592c..3769e6bd63b1 100644 --- a/include/asm-generic/termios.h +++ b/include/asm-generic/termios.h | |||
@@ -11,7 +11,7 @@ | |||
11 | /* | 11 | /* |
12 | * Translate a "termio" structure into a "termios". Ugh. | 12 | * Translate a "termio" structure into a "termios". Ugh. |
13 | */ | 13 | */ |
14 | static inline int user_termio_to_kernel_termios(struct termios *termios, | 14 | static inline int user_termio_to_kernel_termios(struct ktermios *termios, |
15 | struct termio __user *termio) | 15 | struct termio __user *termio) |
16 | { | 16 | { |
17 | unsigned short tmp; | 17 | unsigned short tmp; |
@@ -48,7 +48,7 @@ static inline int user_termio_to_kernel_termios(struct termios *termios, | |||
48 | * Translate a "termios" structure into a "termio". Ugh. | 48 | * Translate a "termios" structure into a "termio". Ugh. |
49 | */ | 49 | */ |
50 | static inline int kernel_termios_to_user_termio(struct termio __user *termio, | 50 | static inline int kernel_termios_to_user_termio(struct termio __user *termio, |
51 | struct termios *termios) | 51 | struct ktermios *termios) |
52 | { | 52 | { |
53 | if (put_user(termios->c_iflag, &termio->c_iflag) < 0 || | 53 | if (put_user(termios->c_iflag, &termio->c_iflag) < 0 || |
54 | put_user(termios->c_oflag, &termio->c_oflag) < 0 || | 54 | put_user(termios->c_oflag, &termio->c_oflag) < 0 || |
diff --git a/include/asm-powerpc/termbits.h b/include/asm-powerpc/termbits.h index b572f21b32c4..5e79198f7d18 100644 --- a/include/asm-powerpc/termbits.h +++ b/include/asm-powerpc/termbits.h | |||
@@ -37,8 +37,8 @@ struct ktermios { | |||
37 | tcflag_t c_oflag; /* output mode flags */ | 37 | tcflag_t c_oflag; /* output mode flags */ |
38 | tcflag_t c_cflag; /* control mode flags */ | 38 | tcflag_t c_cflag; /* control mode flags */ |
39 | tcflag_t c_lflag; /* local mode flags */ | 39 | tcflag_t c_lflag; /* local mode flags */ |
40 | cc_t c_line; /* line discipline */ | ||
41 | cc_t c_cc[NCCS]; /* control characters */ | 40 | cc_t c_cc[NCCS]; /* control characters */ |
41 | cc_t c_line; /* line discipline (== c_cc[19]) */ | ||
42 | speed_t c_ispeed; /* input speed */ | 42 | speed_t c_ispeed; /* input speed */ |
43 | speed_t c_ospeed; /* output speed */ | 43 | speed_t c_ospeed; /* output speed */ |
44 | }; | 44 | }; |
diff --git a/include/linux/generic_serial.h b/include/linux/generic_serial.h index e25384561955..5412da28fa47 100644 --- a/include/linux/generic_serial.h +++ b/include/linux/generic_serial.h | |||
@@ -91,7 +91,7 @@ void gs_hangup(struct tty_struct *tty); | |||
91 | int gs_block_til_ready(void *port, struct file *filp); | 91 | int gs_block_til_ready(void *port, struct file *filp); |
92 | void gs_close(struct tty_struct *tty, struct file *filp); | 92 | void gs_close(struct tty_struct *tty, struct file *filp); |
93 | void gs_set_termios (struct tty_struct * tty, | 93 | void gs_set_termios (struct tty_struct * tty, |
94 | struct termios * old_termios); | 94 | struct ktermios * old_termios); |
95 | int gs_init_port(struct gs_port *port); | 95 | int gs_init_port(struct gs_port *port); |
96 | int gs_setserial(struct gs_port *port, struct serial_struct __user *sp); | 96 | int gs_setserial(struct gs_port *port, struct serial_struct __user *sp); |
97 | int gs_getserial(struct gs_port *port, struct serial_struct __user *sp); | 97 | int gs_getserial(struct gs_port *port, struct serial_struct __user *sp); |
diff --git a/include/linux/isdn.h b/include/linux/isdn.h index 62991148d5a5..3c7875b7ab5b 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h | |||
@@ -511,8 +511,8 @@ typedef struct modem_info { | |||
511 | #endif | 511 | #endif |
512 | struct tty_struct *tty; /* Pointer to corresponding tty */ | 512 | struct tty_struct *tty; /* Pointer to corresponding tty */ |
513 | atemu emu; /* AT-emulator data */ | 513 | atemu emu; /* AT-emulator data */ |
514 | struct termios normal_termios; /* For saving termios structs */ | 514 | struct ktermios normal_termios; /* For saving termios structs */ |
515 | struct termios callout_termios; | 515 | struct ktermios callout_termios; |
516 | wait_queue_head_t open_wait, close_wait; | 516 | wait_queue_head_t open_wait, close_wait; |
517 | struct semaphore write_sem; | 517 | struct semaphore write_sem; |
518 | spinlock_t readlock; | 518 | spinlock_t readlock; |
@@ -525,8 +525,8 @@ typedef struct _isdn_modem { | |||
525 | int refcount; /* Number of opens */ | 525 | int refcount; /* Number of opens */ |
526 | struct tty_driver *tty_modem; /* tty-device */ | 526 | struct tty_driver *tty_modem; /* tty-device */ |
527 | struct tty_struct *modem_table[ISDN_MAX_CHANNELS]; /* ?? copied from Orig */ | 527 | struct tty_struct *modem_table[ISDN_MAX_CHANNELS]; /* ?? copied from Orig */ |
528 | struct termios *modem_termios[ISDN_MAX_CHANNELS]; | 528 | struct ktermios *modem_termios[ISDN_MAX_CHANNELS]; |
529 | struct termios *modem_termios_locked[ISDN_MAX_CHANNELS]; | 529 | struct ktermios *modem_termios_locked[ISDN_MAX_CHANNELS]; |
530 | modem_info info[ISDN_MAX_CHANNELS]; /* Private data */ | 530 | modem_info info[ISDN_MAX_CHANNELS]; /* Private data */ |
531 | } isdn_modem_t; | 531 | } isdn_modem_t; |
532 | 532 | ||
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 827672136646..cf23813cbec2 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -166,8 +166,8 @@ struct uart_ops { | |||
166 | void (*break_ctl)(struct uart_port *, int ctl); | 166 | void (*break_ctl)(struct uart_port *, int ctl); |
167 | int (*startup)(struct uart_port *); | 167 | int (*startup)(struct uart_port *); |
168 | void (*shutdown)(struct uart_port *); | 168 | void (*shutdown)(struct uart_port *); |
169 | void (*set_termios)(struct uart_port *, struct termios *new, | 169 | void (*set_termios)(struct uart_port *, struct ktermios *new, |
170 | struct termios *old); | 170 | struct ktermios *old); |
171 | void (*pm)(struct uart_port *, unsigned int state, | 171 | void (*pm)(struct uart_port *, unsigned int state, |
172 | unsigned int oldstate); | 172 | unsigned int oldstate); |
173 | int (*set_wake)(struct uart_port *, unsigned int state); | 173 | int (*set_wake)(struct uart_port *, unsigned int state); |
@@ -361,8 +361,8 @@ void uart_write_wakeup(struct uart_port *port); | |||
361 | */ | 361 | */ |
362 | void uart_update_timeout(struct uart_port *port, unsigned int cflag, | 362 | void uart_update_timeout(struct uart_port *port, unsigned int cflag, |
363 | unsigned int baud); | 363 | unsigned int baud); |
364 | unsigned int uart_get_baud_rate(struct uart_port *port, struct termios *termios, | 364 | unsigned int uart_get_baud_rate(struct uart_port *port, struct ktermios *termios, |
365 | struct termios *old, unsigned int min, | 365 | struct ktermios *old, unsigned int min, |
366 | unsigned int max); | 366 | unsigned int max); |
367 | unsigned int uart_get_divisor(struct uart_port *port, unsigned int baud); | 367 | unsigned int uart_get_divisor(struct uart_port *port, unsigned int baud); |
368 | 368 | ||
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 91b3ea2bbb14..10f99e5f1a97 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -218,7 +218,7 @@ struct usb_serial_driver { | |||
218 | int (*write) (struct usb_serial_port *port, const unsigned char *buf, int count); | 218 | int (*write) (struct usb_serial_port *port, const unsigned char *buf, int count); |
219 | int (*write_room) (struct usb_serial_port *port); | 219 | int (*write_room) (struct usb_serial_port *port); |
220 | int (*ioctl) (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg); | 220 | int (*ioctl) (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg); |
221 | void (*set_termios) (struct usb_serial_port *port, struct termios * old); | 221 | void (*set_termios) (struct usb_serial_port *port, struct ktermios * old); |
222 | void (*break_ctl) (struct usb_serial_port *port, int break_state); | 222 | void (*break_ctl) (struct usb_serial_port *port, int break_state); |
223 | int (*chars_in_buffer) (struct usb_serial_port *port); | 223 | int (*chars_in_buffer) (struct usb_serial_port *port); |
224 | void (*throttle) (struct usb_serial_port *port); | 224 | void (*throttle) (struct usb_serial_port *port); |