aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/stallion.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/stallion.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/stallion.c')
-rw-r--r--drivers/char/stallion.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index a547c0c8fb2a..71bfdccfb42e 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -141,9 +141,11 @@ static struct tty_driver *stl_serial;
141 * with this termios initially. Basically all it defines is a raw port 141 * with this termios initially. Basically all it defines is a raw port
142 * at 9600, 8 data bits, 1 stop bit. 142 * at 9600, 8 data bits, 1 stop bit.
143 */ 143 */
144static struct termios stl_deftermios = { 144static struct ktermios stl_deftermios = {
145 .c_cflag = (B9600 | CS8 | CREAD | HUPCL | CLOCAL), 145 .c_cflag = (B9600 | CS8 | CREAD | HUPCL | CLOCAL),
146 .c_cc = INIT_C_CC, 146 .c_cc = INIT_C_CC,
147 .c_ispeed = 9600,
148 .c_ospeed = 9600,
147}; 149};
148 150
149/* 151/*
@@ -464,7 +466,7 @@ static int stl_cd1400getreg(struct stlport *portp, int regnr);
464static int stl_cd1400updatereg(struct stlport *portp, int regnr, int value); 466static int stl_cd1400updatereg(struct stlport *portp, int regnr, int value);
465static int stl_cd1400panelinit(struct stlbrd *brdp, struct stlpanel *panelp); 467static int stl_cd1400panelinit(struct stlbrd *brdp, struct stlpanel *panelp);
466static void stl_cd1400portinit(struct stlbrd *brdp, struct stlpanel *panelp, struct stlport *portp); 468static void stl_cd1400portinit(struct stlbrd *brdp, struct stlpanel *panelp, struct stlport *portp);
467static void stl_cd1400setport(struct stlport *portp, struct termios *tiosp); 469static void stl_cd1400setport(struct stlport *portp, struct ktermios *tiosp);
468static int stl_cd1400getsignals(struct stlport *portp); 470static int stl_cd1400getsignals(struct stlport *portp);
469static void stl_cd1400setsignals(struct stlport *portp, int dtr, int rts); 471static void stl_cd1400setsignals(struct stlport *portp, int dtr, int rts);
470static void stl_cd1400ccrwait(struct stlport *portp); 472static void stl_cd1400ccrwait(struct stlport *portp);
@@ -493,7 +495,7 @@ static int stl_sc26198updatereg(struct stlport *portp, int regnr, int value);
493static int stl_sc26198getglobreg(struct stlport *portp, int regnr); 495static int stl_sc26198getglobreg(struct stlport *portp, int regnr);
494static int stl_sc26198panelinit(struct stlbrd *brdp, struct stlpanel *panelp); 496static int stl_sc26198panelinit(struct stlbrd *brdp, struct stlpanel *panelp);
495static void stl_sc26198portinit(struct stlbrd *brdp, struct stlpanel *panelp, struct stlport *portp); 497static void stl_sc26198portinit(struct stlbrd *brdp, struct stlpanel *panelp, struct stlport *portp);
496static void stl_sc26198setport(struct stlport *portp, struct termios *tiosp); 498static void stl_sc26198setport(struct stlport *portp, struct ktermios *tiosp);
497static int stl_sc26198getsignals(struct stlport *portp); 499static int stl_sc26198getsignals(struct stlport *portp);
498static void stl_sc26198setsignals(struct stlport *portp, int dtr, int rts); 500static void stl_sc26198setsignals(struct stlport *portp, int dtr, int rts);
499static void stl_sc26198enablerxtx(struct stlport *portp, int rx, int tx); 501static void stl_sc26198enablerxtx(struct stlport *portp, int rx, int tx);
@@ -521,7 +523,7 @@ static void stl_sc26198otherisr(struct stlport *port, unsigned int iack);
521typedef struct uart { 523typedef struct uart {
522 int (*panelinit)(struct stlbrd *brdp, struct stlpanel *panelp); 524 int (*panelinit)(struct stlbrd *brdp, struct stlpanel *panelp);
523 void (*portinit)(struct stlbrd *brdp, struct stlpanel *panelp, struct stlport *portp); 525 void (*portinit)(struct stlbrd *brdp, struct stlpanel *panelp, struct stlport *portp);
524 void (*setport)(struct stlport *portp, struct termios *tiosp); 526 void (*setport)(struct stlport *portp, struct ktermios *tiosp);
525 int (*getsignals)(struct stlport *portp); 527 int (*getsignals)(struct stlport *portp);
526 void (*setsignals)(struct stlport *portp, int dtr, int rts); 528 void (*setsignals)(struct stlport *portp, int dtr, int rts);
527 void (*enablerxtx)(struct stlport *portp, int rx, int tx); 529 void (*enablerxtx)(struct stlport *portp, int rx, int tx);
@@ -1427,10 +1429,10 @@ static void stl_start(struct tty_struct *tty)
1427 1429
1428/*****************************************************************************/ 1430/*****************************************************************************/
1429 1431
1430static void stl_settermios(struct tty_struct *tty, struct termios *old) 1432static void stl_settermios(struct tty_struct *tty, struct ktermios *old)
1431{ 1433{
1432 struct stlport *portp; 1434 struct stlport *portp;
1433 struct termios *tiosp; 1435 struct ktermios *tiosp;
1434 1436
1435 pr_debug("stl_settermios(tty=%p,old=%p)\n", tty, old); 1437 pr_debug("stl_settermios(tty=%p,old=%p)\n", tty, old);
1436 1438
@@ -2468,7 +2470,7 @@ static int __init stl_findpcibrds(void)
2468 pr_debug("stl_findpcibrds()\n"); 2470 pr_debug("stl_findpcibrds()\n");
2469 2471
2470 for (i = 0; (i < stl_nrpcibrds); i++) 2472 for (i = 0; (i < stl_nrpcibrds); i++)
2471 while ((dev = pci_find_device(stl_pcibrds[i].vendid, 2473 while ((dev = pci_get_device(stl_pcibrds[i].vendid,
2472 stl_pcibrds[i].devid, dev))) { 2474 stl_pcibrds[i].devid, dev))) {
2473 2475
2474/* 2476/*
@@ -2947,7 +2949,7 @@ static void stl_cd1400ccrwait(struct stlport *portp)
2947 * settings. 2949 * settings.
2948 */ 2950 */
2949 2951
2950static void stl_cd1400setport(struct stlport *portp, struct termios *tiosp) 2952static void stl_cd1400setport(struct stlport *portp, struct ktermios *tiosp)
2951{ 2953{
2952 struct stlbrd *brdp; 2954 struct stlbrd *brdp;
2953 unsigned long flags; 2955 unsigned long flags;
@@ -3924,7 +3926,7 @@ static void stl_sc26198portinit(struct stlbrd *brdp, struct stlpanel *panelp, st
3924 * settings. 3926 * settings.
3925 */ 3927 */
3926 3928
3927static void stl_sc26198setport(struct stlport *portp, struct termios *tiosp) 3929static void stl_sc26198setport(struct stlport *portp, struct ktermios *tiosp)
3928{ 3930{
3929 struct stlbrd *brdp; 3931 struct stlbrd *brdp;
3930 unsigned long flags; 3932 unsigned long flags;