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 /drivers/char/istallion.c | |
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 'drivers/char/istallion.c')
-rw-r--r-- | drivers/char/istallion.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c index b6f0d036a760..0ef2523733ee 100644 --- a/drivers/char/istallion.c +++ b/drivers/char/istallion.c | |||
@@ -194,9 +194,11 @@ static struct tty_struct *stli_txcooktty; | |||
194 | * with this termios initially. Basically all it defines is a raw port | 194 | * with this termios initially. Basically all it defines is a raw port |
195 | * at 9600 baud, 8 data bits, no parity, 1 stop bit. | 195 | * at 9600 baud, 8 data bits, no parity, 1 stop bit. |
196 | */ | 196 | */ |
197 | static struct termios stli_deftermios = { | 197 | static struct ktermios stli_deftermios = { |
198 | .c_cflag = (B9600 | CS8 | CREAD | HUPCL | CLOCAL), | 198 | .c_cflag = (B9600 | CS8 | CREAD | HUPCL | CLOCAL), |
199 | .c_cc = INIT_C_CC, | 199 | .c_cc = INIT_C_CC, |
200 | .c_ispeed = 9600, | ||
201 | .c_ospeed = 9600, | ||
200 | }; | 202 | }; |
201 | 203 | ||
202 | /* | 204 | /* |
@@ -639,7 +641,7 @@ static void stli_flushchars(struct tty_struct *tty); | |||
639 | static int stli_writeroom(struct tty_struct *tty); | 641 | static int stli_writeroom(struct tty_struct *tty); |
640 | static int stli_charsinbuffer(struct tty_struct *tty); | 642 | static int stli_charsinbuffer(struct tty_struct *tty); |
641 | static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); | 643 | static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); |
642 | static void stli_settermios(struct tty_struct *tty, struct termios *old); | 644 | static void stli_settermios(struct tty_struct *tty, struct ktermios *old); |
643 | static void stli_throttle(struct tty_struct *tty); | 645 | static void stli_throttle(struct tty_struct *tty); |
644 | static void stli_unthrottle(struct tty_struct *tty); | 646 | static void stli_unthrottle(struct tty_struct *tty); |
645 | static void stli_stop(struct tty_struct *tty); | 647 | static void stli_stop(struct tty_struct *tty); |
@@ -669,7 +671,7 @@ static int stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, v | |||
669 | static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); | 671 | static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); |
670 | static void __stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); | 672 | static void __stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); |
671 | static void stli_dodelaycmd(stliport_t *portp, cdkctrl_t __iomem *cp); | 673 | static void stli_dodelaycmd(stliport_t *portp, cdkctrl_t __iomem *cp); |
672 | static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tiosp); | 674 | static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct ktermios *tiosp); |
673 | static void stli_mkasysigs(asysigs_t *sp, int dtr, int rts); | 675 | static void stli_mkasysigs(asysigs_t *sp, int dtr, int rts); |
674 | static long stli_mktiocm(unsigned long sigvalue); | 676 | static long stli_mktiocm(unsigned long sigvalue); |
675 | static void stli_read(stlibrd_t *brdp, stliport_t *portp); | 677 | static void stli_read(stlibrd_t *brdp, stliport_t *portp); |
@@ -1889,11 +1891,11 @@ static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cm | |||
1889 | * Looks like it is true for the current ttys implementation..!! | 1891 | * Looks like it is true for the current ttys implementation..!! |
1890 | */ | 1892 | */ |
1891 | 1893 | ||
1892 | static void stli_settermios(struct tty_struct *tty, struct termios *old) | 1894 | static void stli_settermios(struct tty_struct *tty, struct ktermios *old) |
1893 | { | 1895 | { |
1894 | stliport_t *portp; | 1896 | stliport_t *portp; |
1895 | stlibrd_t *brdp; | 1897 | stlibrd_t *brdp; |
1896 | struct termios *tiosp; | 1898 | struct ktermios *tiosp; |
1897 | asyport_t aport; | 1899 | asyport_t aport; |
1898 | 1900 | ||
1899 | if (tty == NULL) | 1901 | if (tty == NULL) |
@@ -2730,7 +2732,7 @@ static void stli_poll(unsigned long arg) | |||
2730 | * the slave. | 2732 | * the slave. |
2731 | */ | 2733 | */ |
2732 | 2734 | ||
2733 | static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tiosp) | 2735 | static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct ktermios *tiosp) |
2734 | { | 2736 | { |
2735 | memset(pp, 0, sizeof(asyport_t)); | 2737 | memset(pp, 0, sizeof(asyport_t)); |
2736 | 2738 | ||