aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/istallion.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-12-08 05:38:45 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:28:57 -0500
commit606d099cdd1080bbb50ea50dc52d98252f8f10a1 (patch)
tree80d17450a5fb78effce3f4312f672c058658e004 /drivers/char/istallion.c
parentedc6afc5496875a640bef0913604be7550c1795d (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.c14
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 */
197static struct termios stli_deftermios = { 197static 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);
639static int stli_writeroom(struct tty_struct *tty); 641static int stli_writeroom(struct tty_struct *tty);
640static int stli_charsinbuffer(struct tty_struct *tty); 642static int stli_charsinbuffer(struct tty_struct *tty);
641static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); 643static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg);
642static void stli_settermios(struct tty_struct *tty, struct termios *old); 644static void stli_settermios(struct tty_struct *tty, struct ktermios *old);
643static void stli_throttle(struct tty_struct *tty); 645static void stli_throttle(struct tty_struct *tty);
644static void stli_unthrottle(struct tty_struct *tty); 646static void stli_unthrottle(struct tty_struct *tty);
645static void stli_stop(struct tty_struct *tty); 647static 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
669static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); 671static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback);
670static void __stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); 672static void __stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback);
671static void stli_dodelaycmd(stliport_t *portp, cdkctrl_t __iomem *cp); 673static void stli_dodelaycmd(stliport_t *portp, cdkctrl_t __iomem *cp);
672static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tiosp); 674static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct ktermios *tiosp);
673static void stli_mkasysigs(asysigs_t *sp, int dtr, int rts); 675static void stli_mkasysigs(asysigs_t *sp, int dtr, int rts);
674static long stli_mktiocm(unsigned long sigvalue); 676static long stli_mktiocm(unsigned long sigvalue);
675static void stli_read(stlibrd_t *brdp, stliport_t *portp); 677static 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
1892static void stli_settermios(struct tty_struct *tty, struct termios *old) 1894static 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
2733static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tiosp) 2735static 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