summaryrefslogtreecommitdiffstats
path: root/drivers/char/stallion.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-12-08 02:38:45 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 08:28:57 -0800
commit606d099cdd1080bbb50ea50dc52d98252f8f10a1 (patch)
tree80d17450a5fb78effce3f4312f672c058658e004 /drivers/char/stallion.c
parentedc6afc5496875a640bef0913604be7550c1795d (diff)
downloadlinux-606d099cdd1080bbb50ea50dc52d98252f8f10a1.tar.gz
linux-606d099cdd1080bbb50ea50dc52d98252f8f10a1.tar.bz2
linux-606d099cdd1080bbb50ea50dc52d98252f8f10a1.zip
[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;
* with this termios initially. Basically all it defines is a raw port
* at 9600, 8 data bits, 1 stop bit.
*/
-static struct termios stl_deftermios = {
+static struct ktermios stl_deftermios = {
.c_cflag = (B9600 | CS8 | CREAD | HUPCL | CLOCAL),
.c_cc = INIT_C_CC,
+ .c_ispeed = 9600,
+ .c_ospeed = 9600,
};
/*
@@ -464,7 +466,7 @@ static int stl_cd1400getreg(struct stlport *portp, int regnr);
static int stl_cd1400updatereg(struct stlport *portp, int regnr, int value);
static int stl_cd1400panelinit(struct stlbrd *brdp, struct stlpanel *panelp);
static void stl_cd1400portinit(struct stlbrd *brdp, struct stlpanel *panelp, struct stlport *portp);
-static void stl_cd1400setport(struct stlport *portp, struct termios *tiosp);
+static void stl_cd1400setport(struct stlport *portp, struct ktermios *tiosp);
static int stl_cd1400getsignals(struct stlport *portp);
static void stl_cd1400setsignals(struct stlport *portp, int dtr, int rts);
static void stl_cd1400ccrwait(struct stlport *portp);
@@ -493,7 +495,7 @@ static int stl_sc26198updatereg(struct stlport *portp, int regnr, int value);
static int stl_sc26198getglobreg(struct stlport *portp, int regnr);
static int stl_sc26198panelinit(struct stlbrd *brdp, struct stlpanel *panelp);
static void stl_sc26198portinit(struct stlbrd *brdp, struct stlpanel *panelp, struct stlport *portp);
-static void stl_sc26198setport(struct stlport *portp, struct termios *tiosp);
+static void stl_sc26198setport(struct stlport *portp, struct ktermios *tiosp);
static int stl_sc26198getsignals(struct stlport *portp);
static void stl_sc26198setsignals(struct stlport *portp, int dtr, int rts);
static void stl_sc26198enablerxtx(struct stlport *portp, int rx, int tx);
@@ -521,7 +523,7 @@ static void stl_sc26198otherisr(struct stlport *port, unsigned int iack);
typedef struct uart {
int (*panelinit)(struct stlbrd *brdp, struct stlpanel *panelp);
void (*portinit)(struct stlbrd *brdp, struct stlpanel *panelp, struct stlport *portp);
- void (*setport)(struct stlport *portp, struct termios *tiosp);
+ void (*setport)(struct stlport *portp, struct ktermios *tiosp);
int (*getsignals)(struct stlport *portp);
void (*setsignals)(struct stlport *portp, int dtr, int rts);
void (*enablerxtx)(struct stlport *portp, int rx, int tx);
@@ -1427,10 +1429,10 @@ static void stl_start(struct tty_struct *tty)
/*****************************************************************************/
-static void stl_settermios(struct tty_struct *tty, struct termios *old)
+static void stl_settermios(struct tty_struct *tty, struct ktermios *old)
{
struct stlport *portp;
- struct termios *tiosp;
+ struct ktermios *tiosp;
pr_debug("stl_settermios(tty=%p,old=%p)\n", tty, old);
@@ -2468,7 +2470,7 @@ static int __init stl_findpcibrds(void)
pr_debug("stl_findpcibrds()\n");
for (i = 0; (i < stl_nrpcibrds); i++)
- while ((dev = pci_find_device(stl_pcibrds[i].vendid,
+ while ((dev = pci_get_device(stl_pcibrds[i].vendid,
stl_pcibrds[i].devid, dev))) {
/*
@@ -2947,7 +2949,7 @@ static void stl_cd1400ccrwait(struct stlport *portp)
* settings.
*/
-static void stl_cd1400setport(struct stlport *portp, struct termios *tiosp)
+static void stl_cd1400setport(struct stlport *portp, struct ktermios *tiosp)
{
struct stlbrd *brdp;
unsigned long flags;
@@ -3924,7 +3926,7 @@ static void stl_sc26198portinit(struct stlbrd *brdp, struct stlpanel *panelp, st
* settings.
*/
-static void stl_sc26198setport(struct stlport *portp, struct termios *tiosp)
+static void stl_sc26198setport(struct stlport *portp, struct ktermios *tiosp)
{
struct stlbrd *brdp;
unsigned long flags;