aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/stallion.c458
1 files changed, 227 insertions, 231 deletions
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index 6a6e5124a5fa..b108ac6e3d83 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -88,16 +88,14 @@
88 * PCI BIOS32 support is compiled into the kernel. 88 * PCI BIOS32 support is compiled into the kernel.
89 */ 89 */
90 90
91typedef struct { 91static struct stlconf {
92 int brdtype; 92 int brdtype;
93 int ioaddr1; 93 int ioaddr1;
94 int ioaddr2; 94 int ioaddr2;
95 unsigned long memaddr; 95 unsigned long memaddr;
96 int irq; 96 int irq;
97 int irqtype; 97 int irqtype;
98} stlconf_t; 98} stl_brdconf[] = {
99
100static stlconf_t stl_brdconf[] = {
101 /*{ BRD_EASYIO, 0x2a0, 0, 0, 10, 0 },*/ 99 /*{ BRD_EASYIO, 0x2a0, 0, 0, 10, 0 },*/
102}; 100};
103 101
@@ -154,8 +152,8 @@ static struct termios stl_deftermios = {
154 */ 152 */
155static comstats_t stl_comstats; 153static comstats_t stl_comstats;
156static combrd_t stl_brdstats; 154static combrd_t stl_brdstats;
157static stlbrd_t stl_dummybrd; 155static struct stlbrd stl_dummybrd;
158static stlport_t stl_dummyport; 156static struct stlport stl_dummyport;
159 157
160/* 158/*
161 * Define global place to put buffer overflow characters. 159 * Define global place to put buffer overflow characters.
@@ -164,7 +162,7 @@ static char stl_unwanted[SC26198_RXFIFOSIZE];
164 162
165/*****************************************************************************/ 163/*****************************************************************************/
166 164
167static stlbrd_t *stl_brds[STL_MAXBRDS]; 165static struct stlbrd *stl_brds[STL_MAXBRDS];
168 166
169/* 167/*
170 * Per board state flags. Used with the state field of the board struct. 168 * Per board state flags. Used with the state field of the board struct.
@@ -243,12 +241,10 @@ static char **stl_brdsp[] = {
243 * parse any module arguments. 241 * parse any module arguments.
244 */ 242 */
245 243
246typedef struct stlbrdtype { 244static struct {
247 char *name; 245 char *name;
248 int type; 246 int type;
249} stlbrdtype_t; 247} stl_brdstr[] = {
250
251static stlbrdtype_t stl_brdstr[] = {
252 { "easyio", BRD_EASYIO }, 248 { "easyio", BRD_EASYIO },
253 { "eio", BRD_EASYIO }, 249 { "eio", BRD_EASYIO },
254 { "20", BRD_EASYIO }, 250 { "20", BRD_EASYIO },
@@ -458,7 +454,7 @@ static unsigned int stl_baudrates[] = {
458 */ 454 */
459 455
460static void stl_argbrds(void); 456static void stl_argbrds(void);
461static int stl_parsebrd(stlconf_t *confp, char **argp); 457static int stl_parsebrd(struct stlconf *confp, char **argp);
462 458
463static unsigned long stl_atol(char *str); 459static unsigned long stl_atol(char *str);
464 460
@@ -482,31 +478,31 @@ static void stl_waituntilsent(struct tty_struct *tty, int timeout);
482static void stl_sendxchar(struct tty_struct *tty, char ch); 478static void stl_sendxchar(struct tty_struct *tty, char ch);
483static void stl_hangup(struct tty_struct *tty); 479static void stl_hangup(struct tty_struct *tty);
484static int stl_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg); 480static int stl_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg);
485static int stl_portinfo(stlport_t *portp, int portnr, char *pos); 481static int stl_portinfo(struct stlport *portp, int portnr, char *pos);
486static int stl_readproc(char *page, char **start, off_t off, int count, int *eof, void *data); 482static int stl_readproc(char *page, char **start, off_t off, int count, int *eof, void *data);
487 483
488static int stl_brdinit(stlbrd_t *brdp); 484static int stl_brdinit(struct stlbrd *brdp);
489static int stl_initports(stlbrd_t *brdp, stlpanel_t *panelp); 485static int stl_initports(struct stlbrd *brdp, struct stlpanel *panelp);
490static int stl_getserial(stlport_t *portp, struct serial_struct __user *sp); 486static int stl_getserial(struct stlport *portp, struct serial_struct __user *sp);
491static int stl_setserial(stlport_t *portp, struct serial_struct __user *sp); 487static int stl_setserial(struct stlport *portp, struct serial_struct __user *sp);
492static int stl_getbrdstats(combrd_t __user *bp); 488static int stl_getbrdstats(combrd_t __user *bp);
493static int stl_getportstats(stlport_t *portp, comstats_t __user *cp); 489static int stl_getportstats(struct stlport *portp, comstats_t __user *cp);
494static int stl_clrportstats(stlport_t *portp, comstats_t __user *cp); 490static int stl_clrportstats(struct stlport *portp, comstats_t __user *cp);
495static int stl_getportstruct(stlport_t __user *arg); 491static int stl_getportstruct(struct stlport __user *arg);
496static int stl_getbrdstruct(stlbrd_t __user *arg); 492static int stl_getbrdstruct(struct stlbrd __user *arg);
497static int stl_waitcarrier(stlport_t *portp, struct file *filp); 493static int stl_waitcarrier(struct stlport *portp, struct file *filp);
498static int stl_eiointr(stlbrd_t *brdp); 494static int stl_eiointr(struct stlbrd *brdp);
499static int stl_echatintr(stlbrd_t *brdp); 495static int stl_echatintr(struct stlbrd *brdp);
500static int stl_echmcaintr(stlbrd_t *brdp); 496static int stl_echmcaintr(struct stlbrd *brdp);
501static int stl_echpciintr(stlbrd_t *brdp); 497static int stl_echpciintr(struct stlbrd *brdp);
502static int stl_echpci64intr(stlbrd_t *brdp); 498static int stl_echpci64intr(struct stlbrd *brdp);
503static void stl_offintr(struct work_struct *); 499static void stl_offintr(struct work_struct *);
504static stlbrd_t *stl_allocbrd(void); 500static struct stlbrd *stl_allocbrd(void);
505static stlport_t *stl_getport(int brdnr, int panelnr, int portnr); 501static struct stlport *stl_getport(int brdnr, int panelnr, int portnr);
506 502
507static inline int stl_initbrds(void); 503static inline int stl_initbrds(void);
508static inline int stl_initeio(stlbrd_t *brdp); 504static inline int stl_initeio(struct stlbrd *brdp);
509static inline int stl_initech(stlbrd_t *brdp); 505static inline int stl_initech(struct stlbrd *brdp);
510static inline int stl_getbrdnr(void); 506static inline int stl_getbrdnr(void);
511 507
512#ifdef CONFIG_PCI 508#ifdef CONFIG_PCI
@@ -517,59 +513,59 @@ static inline int stl_initpcibrd(int brdtype, struct pci_dev *devp);
517/* 513/*
518 * CD1400 uart specific handling functions. 514 * CD1400 uart specific handling functions.
519 */ 515 */
520static void stl_cd1400setreg(stlport_t *portp, int regnr, int value); 516static void stl_cd1400setreg(struct stlport *portp, int regnr, int value);
521static int stl_cd1400getreg(stlport_t *portp, int regnr); 517static int stl_cd1400getreg(struct stlport *portp, int regnr);
522static int stl_cd1400updatereg(stlport_t *portp, int regnr, int value); 518static int stl_cd1400updatereg(struct stlport *portp, int regnr, int value);
523static int stl_cd1400panelinit(stlbrd_t *brdp, stlpanel_t *panelp); 519static int stl_cd1400panelinit(struct stlbrd *brdp, struct stlpanel *panelp);
524static void stl_cd1400portinit(stlbrd_t *brdp, stlpanel_t *panelp, stlport_t *portp); 520static void stl_cd1400portinit(struct stlbrd *brdp, struct stlpanel *panelp, struct stlport *portp);
525static void stl_cd1400setport(stlport_t *portp, struct termios *tiosp); 521static void stl_cd1400setport(struct stlport *portp, struct termios *tiosp);
526static int stl_cd1400getsignals(stlport_t *portp); 522static int stl_cd1400getsignals(struct stlport *portp);
527static void stl_cd1400setsignals(stlport_t *portp, int dtr, int rts); 523static void stl_cd1400setsignals(struct stlport *portp, int dtr, int rts);
528static void stl_cd1400ccrwait(stlport_t *portp); 524static void stl_cd1400ccrwait(struct stlport *portp);
529static void stl_cd1400enablerxtx(stlport_t *portp, int rx, int tx); 525static void stl_cd1400enablerxtx(struct stlport *portp, int rx, int tx);
530static void stl_cd1400startrxtx(stlport_t *portp, int rx, int tx); 526static void stl_cd1400startrxtx(struct stlport *portp, int rx, int tx);
531static void stl_cd1400disableintrs(stlport_t *portp); 527static void stl_cd1400disableintrs(struct stlport *portp);
532static void stl_cd1400sendbreak(stlport_t *portp, int len); 528static void stl_cd1400sendbreak(struct stlport *portp, int len);
533static void stl_cd1400flowctrl(stlport_t *portp, int state); 529static void stl_cd1400flowctrl(struct stlport *portp, int state);
534static void stl_cd1400sendflow(stlport_t *portp, int state); 530static void stl_cd1400sendflow(struct stlport *portp, int state);
535static void stl_cd1400flush(stlport_t *portp); 531static void stl_cd1400flush(struct stlport *portp);
536static int stl_cd1400datastate(stlport_t *portp); 532static int stl_cd1400datastate(struct stlport *portp);
537static void stl_cd1400eiointr(stlpanel_t *panelp, unsigned int iobase); 533static void stl_cd1400eiointr(struct stlpanel *panelp, unsigned int iobase);
538static void stl_cd1400echintr(stlpanel_t *panelp, unsigned int iobase); 534static void stl_cd1400echintr(struct stlpanel *panelp, unsigned int iobase);
539static void stl_cd1400txisr(stlpanel_t *panelp, int ioaddr); 535static void stl_cd1400txisr(struct stlpanel *panelp, int ioaddr);
540static void stl_cd1400rxisr(stlpanel_t *panelp, int ioaddr); 536static void stl_cd1400rxisr(struct stlpanel *panelp, int ioaddr);
541static void stl_cd1400mdmisr(stlpanel_t *panelp, int ioaddr); 537static void stl_cd1400mdmisr(struct stlpanel *panelp, int ioaddr);
542 538
543static inline int stl_cd1400breakisr(stlport_t *portp, int ioaddr); 539static inline int stl_cd1400breakisr(struct stlport *portp, int ioaddr);
544 540
545/* 541/*
546 * SC26198 uart specific handling functions. 542 * SC26198 uart specific handling functions.
547 */ 543 */
548static void stl_sc26198setreg(stlport_t *portp, int regnr, int value); 544static void stl_sc26198setreg(struct stlport *portp, int regnr, int value);
549static int stl_sc26198getreg(stlport_t *portp, int regnr); 545static int stl_sc26198getreg(struct stlport *portp, int regnr);
550static int stl_sc26198updatereg(stlport_t *portp, int regnr, int value); 546static int stl_sc26198updatereg(struct stlport *portp, int regnr, int value);
551static int stl_sc26198getglobreg(stlport_t *portp, int regnr); 547static int stl_sc26198getglobreg(struct stlport *portp, int regnr);
552static int stl_sc26198panelinit(stlbrd_t *brdp, stlpanel_t *panelp); 548static int stl_sc26198panelinit(struct stlbrd *brdp, struct stlpanel *panelp);
553static void stl_sc26198portinit(stlbrd_t *brdp, stlpanel_t *panelp, stlport_t *portp); 549static void stl_sc26198portinit(struct stlbrd *brdp, struct stlpanel *panelp, struct stlport *portp);
554static void stl_sc26198setport(stlport_t *portp, struct termios *tiosp); 550static void stl_sc26198setport(struct stlport *portp, struct termios *tiosp);
555static int stl_sc26198getsignals(stlport_t *portp); 551static int stl_sc26198getsignals(struct stlport *portp);
556static void stl_sc26198setsignals(stlport_t *portp, int dtr, int rts); 552static void stl_sc26198setsignals(struct stlport *portp, int dtr, int rts);
557static void stl_sc26198enablerxtx(stlport_t *portp, int rx, int tx); 553static void stl_sc26198enablerxtx(struct stlport *portp, int rx, int tx);
558static void stl_sc26198startrxtx(stlport_t *portp, int rx, int tx); 554static void stl_sc26198startrxtx(struct stlport *portp, int rx, int tx);
559static void stl_sc26198disableintrs(stlport_t *portp); 555static void stl_sc26198disableintrs(struct stlport *portp);
560static void stl_sc26198sendbreak(stlport_t *portp, int len); 556static void stl_sc26198sendbreak(struct stlport *portp, int len);
561static void stl_sc26198flowctrl(stlport_t *portp, int state); 557static void stl_sc26198flowctrl(struct stlport *portp, int state);
562static void stl_sc26198sendflow(stlport_t *portp, int state); 558static void stl_sc26198sendflow(struct stlport *portp, int state);
563static void stl_sc26198flush(stlport_t *portp); 559static void stl_sc26198flush(struct stlport *portp);
564static int stl_sc26198datastate(stlport_t *portp); 560static int stl_sc26198datastate(struct stlport *portp);
565static void stl_sc26198wait(stlport_t *portp); 561static void stl_sc26198wait(struct stlport *portp);
566static void stl_sc26198txunflow(stlport_t *portp, struct tty_struct *tty); 562static void stl_sc26198txunflow(struct stlport *portp, struct tty_struct *tty);
567static void stl_sc26198intr(stlpanel_t *panelp, unsigned int iobase); 563static void stl_sc26198intr(struct stlpanel *panelp, unsigned int iobase);
568static void stl_sc26198txisr(stlport_t *port); 564static void stl_sc26198txisr(struct stlport *port);
569static void stl_sc26198rxisr(stlport_t *port, unsigned int iack); 565static void stl_sc26198rxisr(struct stlport *port, unsigned int iack);
570static void stl_sc26198rxbadch(stlport_t *portp, unsigned char status, char ch); 566static void stl_sc26198rxbadch(struct stlport *portp, unsigned char status, char ch);
571static void stl_sc26198rxbadchars(stlport_t *portp); 567static void stl_sc26198rxbadchars(struct stlport *portp);
572static void stl_sc26198otherisr(stlport_t *port, unsigned int iack); 568static void stl_sc26198otherisr(struct stlport *port, unsigned int iack);
573 569
574/*****************************************************************************/ 570/*****************************************************************************/
575 571
@@ -577,20 +573,20 @@ static void stl_sc26198otherisr(stlport_t *port, unsigned int iack);
577 * Generic UART support structure. 573 * Generic UART support structure.
578 */ 574 */
579typedef struct uart { 575typedef struct uart {
580 int (*panelinit)(stlbrd_t *brdp, stlpanel_t *panelp); 576 int (*panelinit)(struct stlbrd *brdp, struct stlpanel *panelp);
581 void (*portinit)(stlbrd_t *brdp, stlpanel_t *panelp, stlport_t *portp); 577 void (*portinit)(struct stlbrd *brdp, struct stlpanel *panelp, struct stlport *portp);
582 void (*setport)(stlport_t *portp, struct termios *tiosp); 578 void (*setport)(struct stlport *portp, struct termios *tiosp);
583 int (*getsignals)(stlport_t *portp); 579 int (*getsignals)(struct stlport *portp);
584 void (*setsignals)(stlport_t *portp, int dtr, int rts); 580 void (*setsignals)(struct stlport *portp, int dtr, int rts);
585 void (*enablerxtx)(stlport_t *portp, int rx, int tx); 581 void (*enablerxtx)(struct stlport *portp, int rx, int tx);
586 void (*startrxtx)(stlport_t *portp, int rx, int tx); 582 void (*startrxtx)(struct stlport *portp, int rx, int tx);
587 void (*disableintrs)(stlport_t *portp); 583 void (*disableintrs)(struct stlport *portp);
588 void (*sendbreak)(stlport_t *portp, int len); 584 void (*sendbreak)(struct stlport *portp, int len);
589 void (*flowctrl)(stlport_t *portp, int state); 585 void (*flowctrl)(struct stlport *portp, int state);
590 void (*sendflow)(stlport_t *portp, int state); 586 void (*sendflow)(struct stlport *portp, int state);
591 void (*flush)(stlport_t *portp); 587 void (*flush)(struct stlport *portp);
592 int (*datastate)(stlport_t *portp); 588 int (*datastate)(struct stlport *portp);
593 void (*intr)(stlpanel_t *panelp, unsigned int iobase); 589 void (*intr)(struct stlpanel *panelp, unsigned int iobase);
594} uart_t; 590} uart_t;
595 591
596/* 592/*
@@ -730,9 +726,9 @@ static int __init stallion_module_init(void)
730 726
731static void __exit stallion_module_exit(void) 727static void __exit stallion_module_exit(void)
732{ 728{
733 stlbrd_t *brdp; 729 struct stlbrd *brdp;
734 stlpanel_t *panelp; 730 struct stlpanel *panelp;
735 stlport_t *portp; 731 struct stlport *portp;
736 int i, j, k; 732 int i, j, k;
737 733
738 pr_debug("cleanup_module()\n"); 734 pr_debug("cleanup_module()\n");
@@ -802,8 +798,8 @@ module_exit(stallion_module_exit);
802 798
803static void stl_argbrds(void) 799static void stl_argbrds(void)
804{ 800{
805 stlconf_t conf; 801 struct stlconf conf;
806 stlbrd_t *brdp; 802 struct stlbrd *brdp;
807 int i; 803 int i;
808 804
809 pr_debug("stl_argbrds()\n"); 805 pr_debug("stl_argbrds()\n");
@@ -867,7 +863,7 @@ static unsigned long stl_atol(char *str)
867 * Parse the supplied argument string, into the board conf struct. 863 * Parse the supplied argument string, into the board conf struct.
868 */ 864 */
869 865
870static int stl_parsebrd(stlconf_t *confp, char **argp) 866static int stl_parsebrd(struct stlconf *confp, char **argp)
871{ 867{
872 char *sp; 868 char *sp;
873 int i; 869 int i;
@@ -911,14 +907,14 @@ static int stl_parsebrd(stlconf_t *confp, char **argp)
911 * Allocate a new board structure. Fill out the basic info in it. 907 * Allocate a new board structure. Fill out the basic info in it.
912 */ 908 */
913 909
914static stlbrd_t *stl_allocbrd(void) 910static struct stlbrd *stl_allocbrd(void)
915{ 911{
916 stlbrd_t *brdp; 912 struct stlbrd *brdp;
917 913
918 brdp = kzalloc(sizeof(stlbrd_t), GFP_KERNEL); 914 brdp = kzalloc(sizeof(struct stlbrd), GFP_KERNEL);
919 if (!brdp) { 915 if (!brdp) {
920 printk("STALLION: failed to allocate memory (size=%Zd)\n", 916 printk("STALLION: failed to allocate memory (size=%Zd)\n",
921 sizeof(stlbrd_t)); 917 sizeof(struct stlbrd));
922 return NULL; 918 return NULL;
923 } 919 }
924 920
@@ -930,8 +926,8 @@ static stlbrd_t *stl_allocbrd(void)
930 926
931static int stl_open(struct tty_struct *tty, struct file *filp) 927static int stl_open(struct tty_struct *tty, struct file *filp)
932{ 928{
933 stlport_t *portp; 929 struct stlport *portp;
934 stlbrd_t *brdp; 930 struct stlbrd *brdp;
935 unsigned int minordev; 931 unsigned int minordev;
936 int brdnr, panelnr, portnr, rc; 932 int brdnr, panelnr, portnr, rc;
937 933
@@ -1020,7 +1016,7 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
1020 * maybe because if we are clocal then we don't need to wait... 1016 * maybe because if we are clocal then we don't need to wait...
1021 */ 1017 */
1022 1018
1023static int stl_waitcarrier(stlport_t *portp, struct file *filp) 1019static int stl_waitcarrier(struct stlport *portp, struct file *filp)
1024{ 1020{
1025 unsigned long flags; 1021 unsigned long flags;
1026 int rc, doclocal; 1022 int rc, doclocal;
@@ -1074,7 +1070,7 @@ static int stl_waitcarrier(stlport_t *portp, struct file *filp)
1074 1070
1075static void stl_close(struct tty_struct *tty, struct file *filp) 1071static void stl_close(struct tty_struct *tty, struct file *filp)
1076{ 1072{
1077 stlport_t *portp; 1073 struct stlport *portp;
1078 unsigned long flags; 1074 unsigned long flags;
1079 1075
1080 pr_debug("stl_close(tty=%p,filp=%p)\n", tty, filp); 1076 pr_debug("stl_close(tty=%p,filp=%p)\n", tty, filp);
@@ -1154,7 +1150,7 @@ static void stl_close(struct tty_struct *tty, struct file *filp)
1154 1150
1155static int stl_write(struct tty_struct *tty, const unsigned char *buf, int count) 1151static int stl_write(struct tty_struct *tty, const unsigned char *buf, int count)
1156{ 1152{
1157 stlport_t *portp; 1153 struct stlport *portp;
1158 unsigned int len, stlen; 1154 unsigned int len, stlen;
1159 unsigned char *chbuf; 1155 unsigned char *chbuf;
1160 char *head, *tail; 1156 char *head, *tail;
@@ -1211,7 +1207,7 @@ static int stl_write(struct tty_struct *tty, const unsigned char *buf, int count
1211 1207
1212static void stl_putchar(struct tty_struct *tty, unsigned char ch) 1208static void stl_putchar(struct tty_struct *tty, unsigned char ch)
1213{ 1209{
1214 stlport_t *portp; 1210 struct stlport *portp;
1215 unsigned int len; 1211 unsigned int len;
1216 char *head, *tail; 1212 char *head, *tail;
1217 1213
@@ -1249,7 +1245,7 @@ static void stl_putchar(struct tty_struct *tty, unsigned char ch)
1249 1245
1250static void stl_flushchars(struct tty_struct *tty) 1246static void stl_flushchars(struct tty_struct *tty)
1251{ 1247{
1252 stlport_t *portp; 1248 struct stlport *portp;
1253 1249
1254 pr_debug("stl_flushchars(tty=%p)\n", tty); 1250 pr_debug("stl_flushchars(tty=%p)\n", tty);
1255 1251
@@ -1268,7 +1264,7 @@ static void stl_flushchars(struct tty_struct *tty)
1268 1264
1269static int stl_writeroom(struct tty_struct *tty) 1265static int stl_writeroom(struct tty_struct *tty)
1270{ 1266{
1271 stlport_t *portp; 1267 struct stlport *portp;
1272 char *head, *tail; 1268 char *head, *tail;
1273 1269
1274 pr_debug("stl_writeroom(tty=%p)\n", tty); 1270 pr_debug("stl_writeroom(tty=%p)\n", tty);
@@ -1299,7 +1295,7 @@ static int stl_writeroom(struct tty_struct *tty)
1299 1295
1300static int stl_charsinbuffer(struct tty_struct *tty) 1296static int stl_charsinbuffer(struct tty_struct *tty)
1301{ 1297{
1302 stlport_t *portp; 1298 struct stlport *portp;
1303 unsigned int size; 1299 unsigned int size;
1304 char *head, *tail; 1300 char *head, *tail;
1305 1301
@@ -1327,10 +1323,10 @@ static int stl_charsinbuffer(struct tty_struct *tty)
1327 * Generate the serial struct info. 1323 * Generate the serial struct info.
1328 */ 1324 */
1329 1325
1330static int stl_getserial(stlport_t *portp, struct serial_struct __user *sp) 1326static int stl_getserial(struct stlport *portp, struct serial_struct __user *sp)
1331{ 1327{
1332 struct serial_struct sio; 1328 struct serial_struct sio;
1333 stlbrd_t *brdp; 1329 struct stlbrd *brdp;
1334 1330
1335 pr_debug("stl_getserial(portp=%p,sp=%p)\n", portp, sp); 1331 pr_debug("stl_getserial(portp=%p,sp=%p)\n", portp, sp);
1336 1332
@@ -1366,7 +1362,7 @@ static int stl_getserial(stlport_t *portp, struct serial_struct __user *sp)
1366 * just quietly ignore any requests to change irq, etc. 1362 * just quietly ignore any requests to change irq, etc.
1367 */ 1363 */
1368 1364
1369static int stl_setserial(stlport_t *portp, struct serial_struct __user *sp) 1365static int stl_setserial(struct stlport *portp, struct serial_struct __user *sp)
1370{ 1366{
1371 struct serial_struct sio; 1367 struct serial_struct sio;
1372 1368
@@ -1396,7 +1392,7 @@ static int stl_setserial(stlport_t *portp, struct serial_struct __user *sp)
1396 1392
1397static int stl_tiocmget(struct tty_struct *tty, struct file *file) 1393static int stl_tiocmget(struct tty_struct *tty, struct file *file)
1398{ 1394{
1399 stlport_t *portp; 1395 struct stlport *portp;
1400 1396
1401 if (tty == NULL) 1397 if (tty == NULL)
1402 return -ENODEV; 1398 return -ENODEV;
@@ -1412,7 +1408,7 @@ static int stl_tiocmget(struct tty_struct *tty, struct file *file)
1412static int stl_tiocmset(struct tty_struct *tty, struct file *file, 1408static int stl_tiocmset(struct tty_struct *tty, struct file *file,
1413 unsigned int set, unsigned int clear) 1409 unsigned int set, unsigned int clear)
1414{ 1410{
1415 stlport_t *portp; 1411 struct stlport *portp;
1416 int rts = -1, dtr = -1; 1412 int rts = -1, dtr = -1;
1417 1413
1418 if (tty == NULL) 1414 if (tty == NULL)
@@ -1438,7 +1434,7 @@ static int stl_tiocmset(struct tty_struct *tty, struct file *file,
1438 1434
1439static int stl_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) 1435static int stl_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg)
1440{ 1436{
1441 stlport_t *portp; 1437 struct stlport *portp;
1442 unsigned int ival; 1438 unsigned int ival;
1443 int rc; 1439 int rc;
1444 void __user *argp = (void __user *)arg; 1440 void __user *argp = (void __user *)arg;
@@ -1503,7 +1499,7 @@ static int stl_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd
1503 1499
1504static void stl_settermios(struct tty_struct *tty, struct termios *old) 1500static void stl_settermios(struct tty_struct *tty, struct termios *old)
1505{ 1501{
1506 stlport_t *portp; 1502 struct stlport *portp;
1507 struct termios *tiosp; 1503 struct termios *tiosp;
1508 1504
1509 pr_debug("stl_settermios(tty=%p,old=%p)\n", tty, old); 1505 pr_debug("stl_settermios(tty=%p,old=%p)\n", tty, old);
@@ -1539,7 +1535,7 @@ static void stl_settermios(struct tty_struct *tty, struct termios *old)
1539 1535
1540static void stl_throttle(struct tty_struct *tty) 1536static void stl_throttle(struct tty_struct *tty)
1541{ 1537{
1542 stlport_t *portp; 1538 struct stlport *portp;
1543 1539
1544 pr_debug("stl_throttle(tty=%p)\n", tty); 1540 pr_debug("stl_throttle(tty=%p)\n", tty);
1545 1541
@@ -1559,7 +1555,7 @@ static void stl_throttle(struct tty_struct *tty)
1559 1555
1560static void stl_unthrottle(struct tty_struct *tty) 1556static void stl_unthrottle(struct tty_struct *tty)
1561{ 1557{
1562 stlport_t *portp; 1558 struct stlport *portp;
1563 1559
1564 pr_debug("stl_unthrottle(tty=%p)\n", tty); 1560 pr_debug("stl_unthrottle(tty=%p)\n", tty);
1565 1561
@@ -1580,7 +1576,7 @@ static void stl_unthrottle(struct tty_struct *tty)
1580 1576
1581static void stl_stop(struct tty_struct *tty) 1577static void stl_stop(struct tty_struct *tty)
1582{ 1578{
1583 stlport_t *portp; 1579 struct stlport *portp;
1584 1580
1585 pr_debug("stl_stop(tty=%p)\n", tty); 1581 pr_debug("stl_stop(tty=%p)\n", tty);
1586 1582
@@ -1600,7 +1596,7 @@ static void stl_stop(struct tty_struct *tty)
1600 1596
1601static void stl_start(struct tty_struct *tty) 1597static void stl_start(struct tty_struct *tty)
1602{ 1598{
1603 stlport_t *portp; 1599 struct stlport *portp;
1604 1600
1605 pr_debug("stl_start(tty=%p)\n", tty); 1601 pr_debug("stl_start(tty=%p)\n", tty);
1606 1602
@@ -1622,7 +1618,7 @@ static void stl_start(struct tty_struct *tty)
1622 1618
1623static void stl_hangup(struct tty_struct *tty) 1619static void stl_hangup(struct tty_struct *tty)
1624{ 1620{
1625 stlport_t *portp; 1621 struct stlport *portp;
1626 1622
1627 pr_debug("stl_hangup(tty=%p)\n", tty); 1623 pr_debug("stl_hangup(tty=%p)\n", tty);
1628 1624
@@ -1656,7 +1652,7 @@ static void stl_hangup(struct tty_struct *tty)
1656 1652
1657static void stl_flushbuffer(struct tty_struct *tty) 1653static void stl_flushbuffer(struct tty_struct *tty)
1658{ 1654{
1659 stlport_t *portp; 1655 struct stlport *portp;
1660 1656
1661 pr_debug("stl_flushbuffer(tty=%p)\n", tty); 1657 pr_debug("stl_flushbuffer(tty=%p)\n", tty);
1662 1658
@@ -1674,7 +1670,7 @@ static void stl_flushbuffer(struct tty_struct *tty)
1674 1670
1675static void stl_breakctl(struct tty_struct *tty, int state) 1671static void stl_breakctl(struct tty_struct *tty, int state)
1676{ 1672{
1677 stlport_t *portp; 1673 struct stlport *portp;
1678 1674
1679 pr_debug("stl_breakctl(tty=%p,state=%d)\n", tty, state); 1675 pr_debug("stl_breakctl(tty=%p,state=%d)\n", tty, state);
1680 1676
@@ -1691,7 +1687,7 @@ static void stl_breakctl(struct tty_struct *tty, int state)
1691 1687
1692static void stl_waituntilsent(struct tty_struct *tty, int timeout) 1688static void stl_waituntilsent(struct tty_struct *tty, int timeout)
1693{ 1689{
1694 stlport_t *portp; 1690 struct stlport *portp;
1695 unsigned long tend; 1691 unsigned long tend;
1696 1692
1697 pr_debug("stl_waituntilsent(tty=%p,timeout=%d)\n", tty, timeout); 1693 pr_debug("stl_waituntilsent(tty=%p,timeout=%d)\n", tty, timeout);
@@ -1719,7 +1715,7 @@ static void stl_waituntilsent(struct tty_struct *tty, int timeout)
1719 1715
1720static void stl_sendxchar(struct tty_struct *tty, char ch) 1716static void stl_sendxchar(struct tty_struct *tty, char ch)
1721{ 1717{
1722 stlport_t *portp; 1718 struct stlport *portp;
1723 1719
1724 pr_debug("stl_sendxchar(tty=%p,ch=%x)\n", tty, ch); 1720 pr_debug("stl_sendxchar(tty=%p,ch=%x)\n", tty, ch);
1725 1721
@@ -1747,7 +1743,7 @@ static void stl_sendxchar(struct tty_struct *tty, char ch)
1747 * short then padded with spaces). 1743 * short then padded with spaces).
1748 */ 1744 */
1749 1745
1750static int stl_portinfo(stlport_t *portp, int portnr, char *pos) 1746static int stl_portinfo(struct stlport *portp, int portnr, char *pos)
1751{ 1747{
1752 char *sp; 1748 char *sp;
1753 int sigs, cnt; 1749 int sigs, cnt;
@@ -1793,9 +1789,9 @@ static int stl_portinfo(stlport_t *portp, int portnr, char *pos)
1793 1789
1794static int stl_readproc(char *page, char **start, off_t off, int count, int *eof, void *data) 1790static int stl_readproc(char *page, char **start, off_t off, int count, int *eof, void *data)
1795{ 1791{
1796 stlbrd_t *brdp; 1792 struct stlbrd *brdp;
1797 stlpanel_t *panelp; 1793 struct stlpanel *panelp;
1798 stlport_t *portp; 1794 struct stlport *portp;
1799 int brdnr, panelnr, portnr, totalport; 1795 int brdnr, panelnr, portnr, totalport;
1800 int curoff, maxoff; 1796 int curoff, maxoff;
1801 char *pos; 1797 char *pos;
@@ -1876,7 +1872,7 @@ stl_readdone:
1876 1872
1877static irqreturn_t stl_intr(int irq, void *dev_id) 1873static irqreturn_t stl_intr(int irq, void *dev_id)
1878{ 1874{
1879 stlbrd_t *brdp = dev_id; 1875 struct stlbrd *brdp = dev_id;
1880 1876
1881 pr_debug("stl_intr(brdp=%p,irq=%d)\n", brdp, irq); 1877 pr_debug("stl_intr(brdp=%p,irq=%d)\n", brdp, irq);
1882 1878
@@ -1889,9 +1885,9 @@ static irqreturn_t stl_intr(int irq, void *dev_id)
1889 * Interrupt service routine for EasyIO board types. 1885 * Interrupt service routine for EasyIO board types.
1890 */ 1886 */
1891 1887
1892static int stl_eiointr(stlbrd_t *brdp) 1888static int stl_eiointr(struct stlbrd *brdp)
1893{ 1889{
1894 stlpanel_t *panelp; 1890 struct stlpanel *panelp;
1895 unsigned int iobase; 1891 unsigned int iobase;
1896 int handled = 0; 1892 int handled = 0;
1897 1893
@@ -1912,9 +1908,9 @@ static int stl_eiointr(stlbrd_t *brdp)
1912 * Interrupt service routine for ECH-AT board types. 1908 * Interrupt service routine for ECH-AT board types.
1913 */ 1909 */
1914 1910
1915static int stl_echatintr(stlbrd_t *brdp) 1911static int stl_echatintr(struct stlbrd *brdp)
1916{ 1912{
1917 stlpanel_t *panelp; 1913 struct stlpanel *panelp;
1918 unsigned int ioaddr; 1914 unsigned int ioaddr;
1919 int bnknr; 1915 int bnknr;
1920 int handled = 0; 1916 int handled = 0;
@@ -1943,9 +1939,9 @@ static int stl_echatintr(stlbrd_t *brdp)
1943 * Interrupt service routine for ECH-MCA board types. 1939 * Interrupt service routine for ECH-MCA board types.
1944 */ 1940 */
1945 1941
1946static int stl_echmcaintr(stlbrd_t *brdp) 1942static int stl_echmcaintr(struct stlbrd *brdp)
1947{ 1943{
1948 stlpanel_t *panelp; 1944 struct stlpanel *panelp;
1949 unsigned int ioaddr; 1945 unsigned int ioaddr;
1950 int bnknr; 1946 int bnknr;
1951 int handled = 0; 1947 int handled = 0;
@@ -1969,9 +1965,9 @@ static int stl_echmcaintr(stlbrd_t *brdp)
1969 * Interrupt service routine for ECH-PCI board types. 1965 * Interrupt service routine for ECH-PCI board types.
1970 */ 1966 */
1971 1967
1972static int stl_echpciintr(stlbrd_t *brdp) 1968static int stl_echpciintr(struct stlbrd *brdp)
1973{ 1969{
1974 stlpanel_t *panelp; 1970 struct stlpanel *panelp;
1975 unsigned int ioaddr; 1971 unsigned int ioaddr;
1976 int bnknr, recheck; 1972 int bnknr, recheck;
1977 int handled = 0; 1973 int handled = 0;
@@ -2000,9 +1996,9 @@ static int stl_echpciintr(stlbrd_t *brdp)
2000 * Interrupt service routine for ECH-8/64-PCI board types. 1996 * Interrupt service routine for ECH-8/64-PCI board types.
2001 */ 1997 */
2002 1998
2003static int stl_echpci64intr(stlbrd_t *brdp) 1999static int stl_echpci64intr(struct stlbrd *brdp)
2004{ 2000{
2005 stlpanel_t *panelp; 2001 struct stlpanel *panelp;
2006 unsigned int ioaddr; 2002 unsigned int ioaddr;
2007 int bnknr; 2003 int bnknr;
2008 int handled = 0; 2004 int handled = 0;
@@ -2028,7 +2024,7 @@ static int stl_echpci64intr(stlbrd_t *brdp)
2028 */ 2024 */
2029static void stl_offintr(struct work_struct *work) 2025static void stl_offintr(struct work_struct *work)
2030{ 2026{
2031 stlport_t *portp = container_of(work, stlport_t, tqueue); 2027 struct stlport *portp = container_of(work, struct stlport, tqueue);
2032 struct tty_struct *tty; 2028 struct tty_struct *tty;
2033 unsigned int oldsigs; 2029 unsigned int oldsigs;
2034 2030
@@ -2065,9 +2061,9 @@ static void stl_offintr(struct work_struct *work)
2065 * Initialize all the ports on a panel. 2061 * Initialize all the ports on a panel.
2066 */ 2062 */
2067 2063
2068static int __init stl_initports(stlbrd_t *brdp, stlpanel_t *panelp) 2064static int __init stl_initports(struct stlbrd *brdp, struct stlpanel *panelp)
2069{ 2065{
2070 stlport_t *portp; 2066 struct stlport *portp;
2071 int chipmask, i; 2067 int chipmask, i;
2072 2068
2073 pr_debug("stl_initports(brdp=%p,panelp=%p)\n", brdp, panelp); 2069 pr_debug("stl_initports(brdp=%p,panelp=%p)\n", brdp, panelp);
@@ -2079,10 +2075,10 @@ static int __init stl_initports(stlbrd_t *brdp, stlpanel_t *panelp)
2079 * each ports data structures. 2075 * each ports data structures.
2080 */ 2076 */
2081 for (i = 0; (i < panelp->nrports); i++) { 2077 for (i = 0; (i < panelp->nrports); i++) {
2082 portp = kzalloc(sizeof(stlport_t), GFP_KERNEL); 2078 portp = kzalloc(sizeof(struct stlport), GFP_KERNEL);
2083 if (!portp) { 2079 if (!portp) {
2084 printk("STALLION: failed to allocate memory " 2080 printk("STALLION: failed to allocate memory "
2085 "(size=%Zd)\n", sizeof(stlport_t)); 2081 "(size=%Zd)\n", sizeof(struct stlport));
2086 break; 2082 break;
2087 } 2083 }
2088 2084
@@ -2114,9 +2110,9 @@ static int __init stl_initports(stlbrd_t *brdp, stlpanel_t *panelp)
2114 * Try to find and initialize an EasyIO board. 2110 * Try to find and initialize an EasyIO board.
2115 */ 2111 */
2116 2112
2117static inline int stl_initeio(stlbrd_t *brdp) 2113static inline int stl_initeio(struct stlbrd *brdp)
2118{ 2114{
2119 stlpanel_t *panelp; 2115 struct stlpanel *panelp;
2120 unsigned int status; 2116 unsigned int status;
2121 char *name; 2117 char *name;
2122 int rc; 2118 int rc;
@@ -2213,10 +2209,10 @@ static inline int stl_initeio(stlbrd_t *brdp)
2213 * can complete the setup. 2209 * can complete the setup.
2214 */ 2210 */
2215 2211
2216 panelp = kzalloc(sizeof(stlpanel_t), GFP_KERNEL); 2212 panelp = kzalloc(sizeof(struct stlpanel), GFP_KERNEL);
2217 if (!panelp) { 2213 if (!panelp) {
2218 printk(KERN_WARNING "STALLION: failed to allocate memory " 2214 printk(KERN_WARNING "STALLION: failed to allocate memory "
2219 "(size=%Zd)\n", sizeof(stlpanel_t)); 2215 "(size=%Zd)\n", sizeof(struct stlpanel));
2220 return -ENOMEM; 2216 return -ENOMEM;
2221 } 2217 }
2222 2218
@@ -2255,9 +2251,9 @@ static inline int stl_initeio(stlbrd_t *brdp)
2255 * dealing with all types of ECH board. 2251 * dealing with all types of ECH board.
2256 */ 2252 */
2257 2253
2258static inline int stl_initech(stlbrd_t *brdp) 2254static inline int stl_initech(struct stlbrd *brdp)
2259{ 2255{
2260 stlpanel_t *panelp; 2256 struct stlpanel *panelp;
2261 unsigned int status, nxtid, ioaddr, conflict; 2257 unsigned int status, nxtid, ioaddr, conflict;
2262 int panelnr, banknr, i; 2258 int panelnr, banknr, i;
2263 char *name; 2259 char *name;
@@ -2385,10 +2381,10 @@ static inline int stl_initech(stlbrd_t *brdp)
2385 status = inb(ioaddr + ECH_PNLSTATUS); 2381 status = inb(ioaddr + ECH_PNLSTATUS);
2386 if ((status & ECH_PNLIDMASK) != nxtid) 2382 if ((status & ECH_PNLIDMASK) != nxtid)
2387 break; 2383 break;
2388 panelp = kzalloc(sizeof(stlpanel_t), GFP_KERNEL); 2384 panelp = kzalloc(sizeof(struct stlpanel), GFP_KERNEL);
2389 if (!panelp) { 2385 if (!panelp) {
2390 printk("STALLION: failed to allocate memory " 2386 printk("STALLION: failed to allocate memory "
2391 "(size=%Zd)\n", sizeof(stlpanel_t)); 2387 "(size=%Zd)\n", sizeof(struct stlpanel));
2392 break; 2388 break;
2393 } 2389 }
2394 panelp->magic = STL_PANELMAGIC; 2390 panelp->magic = STL_PANELMAGIC;
@@ -2466,7 +2462,7 @@ static inline int stl_initech(stlbrd_t *brdp)
2466 * since the initial search and setup is very different. 2462 * since the initial search and setup is very different.
2467 */ 2463 */
2468 2464
2469static int __init stl_brdinit(stlbrd_t *brdp) 2465static int __init stl_brdinit(struct stlbrd *brdp)
2470{ 2466{
2471 int i; 2467 int i;
2472 2468
@@ -2540,7 +2536,7 @@ static inline int stl_getbrdnr(void)
2540 2536
2541static inline int stl_initpcibrd(int brdtype, struct pci_dev *devp) 2537static inline int stl_initpcibrd(int brdtype, struct pci_dev *devp)
2542{ 2538{
2543 stlbrd_t *brdp; 2539 struct stlbrd *brdp;
2544 2540
2545 pr_debug("stl_initpcibrd(brdtype=%d,busnr=%x,devnr=%x)\n", brdtype, 2541 pr_debug("stl_initpcibrd(brdtype=%d,busnr=%x,devnr=%x)\n", brdtype,
2546 devp->bus->number, devp->devfn); 2542 devp->bus->number, devp->devfn);
@@ -2638,8 +2634,8 @@ static inline int stl_findpcibrds(void)
2638 2634
2639static inline int stl_initbrds(void) 2635static inline int stl_initbrds(void)
2640{ 2636{
2641 stlbrd_t *brdp; 2637 struct stlbrd *brdp;
2642 stlconf_t *confp; 2638 struct stlconf *confp;
2643 int i; 2639 int i;
2644 2640
2645 pr_debug("stl_initbrds()\n"); 2641 pr_debug("stl_initbrds()\n");
@@ -2688,8 +2684,8 @@ static inline int stl_initbrds(void)
2688 2684
2689static int stl_getbrdstats(combrd_t __user *bp) 2685static int stl_getbrdstats(combrd_t __user *bp)
2690{ 2686{
2691 stlbrd_t *brdp; 2687 struct stlbrd *brdp;
2692 stlpanel_t *panelp; 2688 struct stlpanel *panelp;
2693 int i; 2689 int i;
2694 2690
2695 if (copy_from_user(&stl_brdstats, bp, sizeof(combrd_t))) 2691 if (copy_from_user(&stl_brdstats, bp, sizeof(combrd_t)))
@@ -2726,10 +2722,10 @@ static int stl_getbrdstats(combrd_t __user *bp)
2726 * Resolve the referenced port number into a port struct pointer. 2722 * Resolve the referenced port number into a port struct pointer.
2727 */ 2723 */
2728 2724
2729static stlport_t *stl_getport(int brdnr, int panelnr, int portnr) 2725static struct stlport *stl_getport(int brdnr, int panelnr, int portnr)
2730{ 2726{
2731 stlbrd_t *brdp; 2727 struct stlbrd *brdp;
2732 stlpanel_t *panelp; 2728 struct stlpanel *panelp;
2733 2729
2734 if ((brdnr < 0) || (brdnr >= STL_MAXBRDS)) 2730 if ((brdnr < 0) || (brdnr >= STL_MAXBRDS))
2735 return(NULL); 2731 return(NULL);
@@ -2754,7 +2750,7 @@ static stlport_t *stl_getport(int brdnr, int panelnr, int portnr)
2754 * what port to get stats for (used through board control device). 2750 * what port to get stats for (used through board control device).
2755 */ 2751 */
2756 2752
2757static int stl_getportstats(stlport_t *portp, comstats_t __user *cp) 2753static int stl_getportstats(struct stlport *portp, comstats_t __user *cp)
2758{ 2754{
2759 unsigned char *head, *tail; 2755 unsigned char *head, *tail;
2760 unsigned long flags; 2756 unsigned long flags;
@@ -2812,7 +2808,7 @@ static int stl_getportstats(stlport_t *portp, comstats_t __user *cp)
2812 * Clear the port stats structure. We also return it zeroed out... 2808 * Clear the port stats structure. We also return it zeroed out...
2813 */ 2809 */
2814 2810
2815static int stl_clrportstats(stlport_t *portp, comstats_t __user *cp) 2811static int stl_clrportstats(struct stlport *portp, comstats_t __user *cp)
2816{ 2812{
2817 if (!portp) { 2813 if (!portp) {
2818 if (copy_from_user(&stl_comstats, cp, sizeof(comstats_t))) 2814 if (copy_from_user(&stl_comstats, cp, sizeof(comstats_t)))
@@ -2837,17 +2833,17 @@ static int stl_clrportstats(stlport_t *portp, comstats_t __user *cp)
2837 * Return the entire driver ports structure to a user app. 2833 * Return the entire driver ports structure to a user app.
2838 */ 2834 */
2839 2835
2840static int stl_getportstruct(stlport_t __user *arg) 2836static int stl_getportstruct(struct stlport __user *arg)
2841{ 2837{
2842 stlport_t *portp; 2838 struct stlport *portp;
2843 2839
2844 if (copy_from_user(&stl_dummyport, arg, sizeof(stlport_t))) 2840 if (copy_from_user(&stl_dummyport, arg, sizeof(struct stlport)))
2845 return -EFAULT; 2841 return -EFAULT;
2846 portp = stl_getport(stl_dummyport.brdnr, stl_dummyport.panelnr, 2842 portp = stl_getport(stl_dummyport.brdnr, stl_dummyport.panelnr,
2847 stl_dummyport.portnr); 2843 stl_dummyport.portnr);
2848 if (!portp) 2844 if (!portp)
2849 return -ENODEV; 2845 return -ENODEV;
2850 return copy_to_user(arg, portp, sizeof(stlport_t)) ? -EFAULT : 0; 2846 return copy_to_user(arg, portp, sizeof(struct stlport)) ? -EFAULT : 0;
2851} 2847}
2852 2848
2853/*****************************************************************************/ 2849/*****************************************************************************/
@@ -2856,18 +2852,18 @@ static int stl_getportstruct(stlport_t __user *arg)
2856 * Return the entire driver board structure to a user app. 2852 * Return the entire driver board structure to a user app.
2857 */ 2853 */
2858 2854
2859static int stl_getbrdstruct(stlbrd_t __user *arg) 2855static int stl_getbrdstruct(struct stlbrd __user *arg)
2860{ 2856{
2861 stlbrd_t *brdp; 2857 struct stlbrd *brdp;
2862 2858
2863 if (copy_from_user(&stl_dummybrd, arg, sizeof(stlbrd_t))) 2859 if (copy_from_user(&stl_dummybrd, arg, sizeof(struct stlbrd)))
2864 return -EFAULT; 2860 return -EFAULT;
2865 if ((stl_dummybrd.brdnr < 0) || (stl_dummybrd.brdnr >= STL_MAXBRDS)) 2861 if ((stl_dummybrd.brdnr < 0) || (stl_dummybrd.brdnr >= STL_MAXBRDS))
2866 return -ENODEV; 2862 return -ENODEV;
2867 brdp = stl_brds[stl_dummybrd.brdnr]; 2863 brdp = stl_brds[stl_dummybrd.brdnr];
2868 if (!brdp) 2864 if (!brdp)
2869 return(-ENODEV); 2865 return(-ENODEV);
2870 return copy_to_user(arg, brdp, sizeof(stlbrd_t)) ? -EFAULT : 0; 2866 return copy_to_user(arg, brdp, sizeof(struct stlbrd)) ? -EFAULT : 0;
2871} 2867}
2872 2868
2873/*****************************************************************************/ 2869/*****************************************************************************/
@@ -2997,19 +2993,19 @@ static int __init stl_init(void)
2997 * (Maybe should make this inline...) 2993 * (Maybe should make this inline...)
2998 */ 2994 */
2999 2995
3000static int stl_cd1400getreg(stlport_t *portp, int regnr) 2996static int stl_cd1400getreg(struct stlport *portp, int regnr)
3001{ 2997{
3002 outb((regnr + portp->uartaddr), portp->ioaddr); 2998 outb((regnr + portp->uartaddr), portp->ioaddr);
3003 return inb(portp->ioaddr + EREG_DATA); 2999 return inb(portp->ioaddr + EREG_DATA);
3004} 3000}
3005 3001
3006static void stl_cd1400setreg(stlport_t *portp, int regnr, int value) 3002static void stl_cd1400setreg(struct stlport *portp, int regnr, int value)
3007{ 3003{
3008 outb((regnr + portp->uartaddr), portp->ioaddr); 3004 outb((regnr + portp->uartaddr), portp->ioaddr);
3009 outb(value, portp->ioaddr + EREG_DATA); 3005 outb(value, portp->ioaddr + EREG_DATA);
3010} 3006}
3011 3007
3012static int stl_cd1400updatereg(stlport_t *portp, int regnr, int value) 3008static int stl_cd1400updatereg(struct stlport *portp, int regnr, int value)
3013{ 3009{
3014 outb((regnr + portp->uartaddr), portp->ioaddr); 3010 outb((regnr + portp->uartaddr), portp->ioaddr);
3015 if (inb(portp->ioaddr + EREG_DATA) != value) { 3011 if (inb(portp->ioaddr + EREG_DATA) != value) {
@@ -3027,7 +3023,7 @@ static int stl_cd1400updatereg(stlport_t *portp, int regnr, int value)
3027 * identical when dealing with ports. 3023 * identical when dealing with ports.
3028 */ 3024 */
3029 3025
3030static int stl_cd1400panelinit(stlbrd_t *brdp, stlpanel_t *panelp) 3026static int stl_cd1400panelinit(struct stlbrd *brdp, struct stlpanel *panelp)
3031{ 3027{
3032 unsigned int gfrcr; 3028 unsigned int gfrcr;
3033 int chipmask, i, j; 3029 int chipmask, i, j;
@@ -3084,7 +3080,7 @@ static int stl_cd1400panelinit(stlbrd_t *brdp, stlpanel_t *panelp)
3084 * Initialize hardware specific port registers. 3080 * Initialize hardware specific port registers.
3085 */ 3081 */
3086 3082
3087static void stl_cd1400portinit(stlbrd_t *brdp, stlpanel_t *panelp, stlport_t *portp) 3083static void stl_cd1400portinit(struct stlbrd *brdp, struct stlpanel *panelp, struct stlport *portp)
3088{ 3084{
3089 unsigned long flags; 3085 unsigned long flags;
3090 pr_debug("stl_cd1400portinit(brdp=%p,panelp=%p,portp=%p)\n", brdp, 3086 pr_debug("stl_cd1400portinit(brdp=%p,panelp=%p,portp=%p)\n", brdp,
@@ -3115,7 +3111,7 @@ static void stl_cd1400portinit(stlbrd_t *brdp, stlpanel_t *panelp, stlport_t *po
3115 * since it won't usually take too long to be ready. 3111 * since it won't usually take too long to be ready.
3116 */ 3112 */
3117 3113
3118static void stl_cd1400ccrwait(stlport_t *portp) 3114static void stl_cd1400ccrwait(struct stlport *portp)
3119{ 3115{
3120 int i; 3116 int i;
3121 3117
@@ -3136,9 +3132,9 @@ static void stl_cd1400ccrwait(stlport_t *portp)
3136 * settings. 3132 * settings.
3137 */ 3133 */
3138 3134
3139static void stl_cd1400setport(stlport_t *portp, struct termios *tiosp) 3135static void stl_cd1400setport(struct stlport *portp, struct termios *tiosp)
3140{ 3136{
3141 stlbrd_t *brdp; 3137 struct stlbrd *brdp;
3142 unsigned long flags; 3138 unsigned long flags;
3143 unsigned int clkdiv, baudrate; 3139 unsigned int clkdiv, baudrate;
3144 unsigned char cor1, cor2, cor3; 3140 unsigned char cor1, cor2, cor3;
@@ -3359,7 +3355,7 @@ static void stl_cd1400setport(stlport_t *portp, struct termios *tiosp)
3359 * Set the state of the DTR and RTS signals. 3355 * Set the state of the DTR and RTS signals.
3360 */ 3356 */
3361 3357
3362static void stl_cd1400setsignals(stlport_t *portp, int dtr, int rts) 3358static void stl_cd1400setsignals(struct stlport *portp, int dtr, int rts)
3363{ 3359{
3364 unsigned char msvr1, msvr2; 3360 unsigned char msvr1, msvr2;
3365 unsigned long flags; 3361 unsigned long flags;
@@ -3391,7 +3387,7 @@ static void stl_cd1400setsignals(stlport_t *portp, int dtr, int rts)
3391 * Return the state of the signals. 3387 * Return the state of the signals.
3392 */ 3388 */
3393 3389
3394static int stl_cd1400getsignals(stlport_t *portp) 3390static int stl_cd1400getsignals(struct stlport *portp)
3395{ 3391{
3396 unsigned char msvr1, msvr2; 3392 unsigned char msvr1, msvr2;
3397 unsigned long flags; 3393 unsigned long flags;
@@ -3427,7 +3423,7 @@ static int stl_cd1400getsignals(stlport_t *portp)
3427 * Enable/Disable the Transmitter and/or Receiver. 3423 * Enable/Disable the Transmitter and/or Receiver.
3428 */ 3424 */
3429 3425
3430static void stl_cd1400enablerxtx(stlport_t *portp, int rx, int tx) 3426static void stl_cd1400enablerxtx(struct stlport *portp, int rx, int tx)
3431{ 3427{
3432 unsigned char ccr; 3428 unsigned char ccr;
3433 unsigned long flags; 3429 unsigned long flags;
@@ -3461,7 +3457,7 @@ static void stl_cd1400enablerxtx(stlport_t *portp, int rx, int tx)
3461 * Start/stop the Transmitter and/or Receiver. 3457 * Start/stop the Transmitter and/or Receiver.
3462 */ 3458 */
3463 3459
3464static void stl_cd1400startrxtx(stlport_t *portp, int rx, int tx) 3460static void stl_cd1400startrxtx(struct stlport *portp, int rx, int tx)
3465{ 3461{
3466 unsigned char sreron, sreroff; 3462 unsigned char sreron, sreroff;
3467 unsigned long flags; 3463 unsigned long flags;
@@ -3498,7 +3494,7 @@ static void stl_cd1400startrxtx(stlport_t *portp, int rx, int tx)
3498 * Disable all interrupts from this port. 3494 * Disable all interrupts from this port.
3499 */ 3495 */
3500 3496
3501static void stl_cd1400disableintrs(stlport_t *portp) 3497static void stl_cd1400disableintrs(struct stlport *portp)
3502{ 3498{
3503 unsigned long flags; 3499 unsigned long flags;
3504 3500
@@ -3514,7 +3510,7 @@ static void stl_cd1400disableintrs(stlport_t *portp)
3514 3510
3515/*****************************************************************************/ 3511/*****************************************************************************/
3516 3512
3517static void stl_cd1400sendbreak(stlport_t *portp, int len) 3513static void stl_cd1400sendbreak(struct stlport *portp, int len)
3518{ 3514{
3519 unsigned long flags; 3515 unsigned long flags;
3520 3516
@@ -3539,7 +3535,7 @@ static void stl_cd1400sendbreak(stlport_t *portp, int len)
3539 * Take flow control actions... 3535 * Take flow control actions...
3540 */ 3536 */
3541 3537
3542static void stl_cd1400flowctrl(stlport_t *portp, int state) 3538static void stl_cd1400flowctrl(struct stlport *portp, int state)
3543{ 3539{
3544 struct tty_struct *tty; 3540 struct tty_struct *tty;
3545 unsigned long flags; 3541 unsigned long flags;
@@ -3601,7 +3597,7 @@ static void stl_cd1400flowctrl(stlport_t *portp, int state)
3601 * Send a flow control character... 3597 * Send a flow control character...
3602 */ 3598 */
3603 3599
3604static void stl_cd1400sendflow(stlport_t *portp, int state) 3600static void stl_cd1400sendflow(struct stlport *portp, int state)
3605{ 3601{
3606 struct tty_struct *tty; 3602 struct tty_struct *tty;
3607 unsigned long flags; 3603 unsigned long flags;
@@ -3634,7 +3630,7 @@ static void stl_cd1400sendflow(stlport_t *portp, int state)
3634 3630
3635/*****************************************************************************/ 3631/*****************************************************************************/
3636 3632
3637static void stl_cd1400flush(stlport_t *portp) 3633static void stl_cd1400flush(struct stlport *portp)
3638{ 3634{
3639 unsigned long flags; 3635 unsigned long flags;
3640 3636
@@ -3663,7 +3659,7 @@ static void stl_cd1400flush(stlport_t *portp)
3663 * maintains the busy port flag. 3659 * maintains the busy port flag.
3664 */ 3660 */
3665 3661
3666static int stl_cd1400datastate(stlport_t *portp) 3662static int stl_cd1400datastate(struct stlport *portp)
3667{ 3663{
3668 pr_debug("stl_cd1400datastate(portp=%p)\n", portp); 3664 pr_debug("stl_cd1400datastate(portp=%p)\n", portp);
3669 3665
@@ -3679,7 +3675,7 @@ static int stl_cd1400datastate(stlport_t *portp)
3679 * Interrupt service routine for cd1400 EasyIO boards. 3675 * Interrupt service routine for cd1400 EasyIO boards.
3680 */ 3676 */
3681 3677
3682static void stl_cd1400eiointr(stlpanel_t *panelp, unsigned int iobase) 3678static void stl_cd1400eiointr(struct stlpanel *panelp, unsigned int iobase)
3683{ 3679{
3684 unsigned char svrtype; 3680 unsigned char svrtype;
3685 3681
@@ -3709,7 +3705,7 @@ static void stl_cd1400eiointr(stlpanel_t *panelp, unsigned int iobase)
3709 * Interrupt service routine for cd1400 panels. 3705 * Interrupt service routine for cd1400 panels.
3710 */ 3706 */
3711 3707
3712static void stl_cd1400echintr(stlpanel_t *panelp, unsigned int iobase) 3708static void stl_cd1400echintr(struct stlpanel *panelp, unsigned int iobase)
3713{ 3709{
3714 unsigned char svrtype; 3710 unsigned char svrtype;
3715 3711
@@ -3735,7 +3731,7 @@ static void stl_cd1400echintr(stlpanel_t *panelp, unsigned int iobase)
3735 * this is the only way to generate them on the cd1400. 3731 * this is the only way to generate them on the cd1400.
3736 */ 3732 */
3737 3733
3738static inline int stl_cd1400breakisr(stlport_t *portp, int ioaddr) 3734static inline int stl_cd1400breakisr(struct stlport *portp, int ioaddr)
3739{ 3735{
3740 if (portp->brklen == 1) { 3736 if (portp->brklen == 1) {
3741 outb((COR2 + portp->uartaddr), ioaddr); 3737 outb((COR2 + portp->uartaddr), ioaddr);
@@ -3777,9 +3773,9 @@ static inline int stl_cd1400breakisr(stlport_t *portp, int ioaddr)
3777 * be NULL if the buffer has been freed. 3773 * be NULL if the buffer has been freed.
3778 */ 3774 */
3779 3775
3780static void stl_cd1400txisr(stlpanel_t *panelp, int ioaddr) 3776static void stl_cd1400txisr(struct stlpanel *panelp, int ioaddr)
3781{ 3777{
3782 stlport_t *portp; 3778 struct stlport *portp;
3783 int len, stlen; 3779 int len, stlen;
3784 char *head, *tail; 3780 char *head, *tail;
3785 unsigned char ioack, srer; 3781 unsigned char ioack, srer;
@@ -3856,9 +3852,9 @@ stl_txalldone:
3856 * shutdown a port not in user context. Need to handle this case. 3852 * shutdown a port not in user context. Need to handle this case.
3857 */ 3853 */
3858 3854
3859static void stl_cd1400rxisr(stlpanel_t *panelp, int ioaddr) 3855static void stl_cd1400rxisr(struct stlpanel *panelp, int ioaddr)
3860{ 3856{
3861 stlport_t *portp; 3857 struct stlport *portp;
3862 struct tty_struct *tty; 3858 struct tty_struct *tty;
3863 unsigned int ioack, len, buflen; 3859 unsigned int ioack, len, buflen;
3864 unsigned char status; 3860 unsigned char status;
@@ -3954,9 +3950,9 @@ stl_rxalldone:
3954 * processing routine. 3950 * processing routine.
3955 */ 3951 */
3956 3952
3957static void stl_cd1400mdmisr(stlpanel_t *panelp, int ioaddr) 3953static void stl_cd1400mdmisr(struct stlpanel *panelp, int ioaddr)
3958{ 3954{
3959 stlport_t *portp; 3955 struct stlport *portp;
3960 unsigned int ioack; 3956 unsigned int ioack;
3961 unsigned char misr; 3957 unsigned char misr;
3962 3958
@@ -3992,19 +3988,19 @@ static void stl_cd1400mdmisr(stlpanel_t *panelp, int ioaddr)
3992 * (Maybe should make this inline...) 3988 * (Maybe should make this inline...)
3993 */ 3989 */
3994 3990
3995static int stl_sc26198getreg(stlport_t *portp, int regnr) 3991static int stl_sc26198getreg(struct stlport *portp, int regnr)
3996{ 3992{
3997 outb((regnr | portp->uartaddr), (portp->ioaddr + XP_ADDR)); 3993 outb((regnr | portp->uartaddr), (portp->ioaddr + XP_ADDR));
3998 return inb(portp->ioaddr + XP_DATA); 3994 return inb(portp->ioaddr + XP_DATA);
3999} 3995}
4000 3996
4001static void stl_sc26198setreg(stlport_t *portp, int regnr, int value) 3997static void stl_sc26198setreg(struct stlport *portp, int regnr, int value)
4002{ 3998{
4003 outb((regnr | portp->uartaddr), (portp->ioaddr + XP_ADDR)); 3999 outb((regnr | portp->uartaddr), (portp->ioaddr + XP_ADDR));
4004 outb(value, (portp->ioaddr + XP_DATA)); 4000 outb(value, (portp->ioaddr + XP_DATA));
4005} 4001}
4006 4002
4007static int stl_sc26198updatereg(stlport_t *portp, int regnr, int value) 4003static int stl_sc26198updatereg(struct stlport *portp, int regnr, int value)
4008{ 4004{
4009 outb((regnr | portp->uartaddr), (portp->ioaddr + XP_ADDR)); 4005 outb((regnr | portp->uartaddr), (portp->ioaddr + XP_ADDR));
4010 if (inb(portp->ioaddr + XP_DATA) != value) { 4006 if (inb(portp->ioaddr + XP_DATA) != value) {
@@ -4020,14 +4016,14 @@ static int stl_sc26198updatereg(stlport_t *portp, int regnr, int value)
4020 * Functions to get and set the sc26198 global registers. 4016 * Functions to get and set the sc26198 global registers.
4021 */ 4017 */
4022 4018
4023static int stl_sc26198getglobreg(stlport_t *portp, int regnr) 4019static int stl_sc26198getglobreg(struct stlport *portp, int regnr)
4024{ 4020{
4025 outb(regnr, (portp->ioaddr + XP_ADDR)); 4021 outb(regnr, (portp->ioaddr + XP_ADDR));
4026 return inb(portp->ioaddr + XP_DATA); 4022 return inb(portp->ioaddr + XP_DATA);
4027} 4023}
4028 4024
4029#if 0 4025#if 0
4030static void stl_sc26198setglobreg(stlport_t *portp, int regnr, int value) 4026static void stl_sc26198setglobreg(struct stlport *portp, int regnr, int value)
4031{ 4027{
4032 outb(regnr, (portp->ioaddr + XP_ADDR)); 4028 outb(regnr, (portp->ioaddr + XP_ADDR));
4033 outb(value, (portp->ioaddr + XP_DATA)); 4029 outb(value, (portp->ioaddr + XP_DATA));
@@ -4042,7 +4038,7 @@ static void stl_sc26198setglobreg(stlport_t *portp, int regnr, int value)
4042 * identical when dealing with ports. 4038 * identical when dealing with ports.
4043 */ 4039 */
4044 4040
4045static int stl_sc26198panelinit(stlbrd_t *brdp, stlpanel_t *panelp) 4041static int stl_sc26198panelinit(struct stlbrd *brdp, struct stlpanel *panelp)
4046{ 4042{
4047 int chipmask, i; 4043 int chipmask, i;
4048 int nrchips, ioaddr; 4044 int nrchips, ioaddr;
@@ -4087,7 +4083,7 @@ static int stl_sc26198panelinit(stlbrd_t *brdp, stlpanel_t *panelp)
4087 * Initialize hardware specific port registers. 4083 * Initialize hardware specific port registers.
4088 */ 4084 */
4089 4085
4090static void stl_sc26198portinit(stlbrd_t *brdp, stlpanel_t *panelp, stlport_t *portp) 4086static void stl_sc26198portinit(struct stlbrd *brdp, struct stlpanel *panelp, struct stlport *portp)
4091{ 4087{
4092 pr_debug("stl_sc26198portinit(brdp=%p,panelp=%p,portp=%p)\n", brdp, 4088 pr_debug("stl_sc26198portinit(brdp=%p,panelp=%p,portp=%p)\n", brdp,
4093 panelp, portp); 4089 panelp, portp);
@@ -4113,9 +4109,9 @@ static void stl_sc26198portinit(stlbrd_t *brdp, stlpanel_t *panelp, stlport_t *p
4113 * settings. 4109 * settings.
4114 */ 4110 */
4115 4111
4116static void stl_sc26198setport(stlport_t *portp, struct termios *tiosp) 4112static void stl_sc26198setport(struct stlport *portp, struct termios *tiosp)
4117{ 4113{
4118 stlbrd_t *brdp; 4114 struct stlbrd *brdp;
4119 unsigned long flags; 4115 unsigned long flags;
4120 unsigned int baudrate; 4116 unsigned int baudrate;
4121 unsigned char mr0, mr1, mr2, clk; 4117 unsigned char mr0, mr1, mr2, clk;
@@ -4308,7 +4304,7 @@ static void stl_sc26198setport(stlport_t *portp, struct termios *tiosp)
4308 * Set the state of the DTR and RTS signals. 4304 * Set the state of the DTR and RTS signals.
4309 */ 4305 */
4310 4306
4311static void stl_sc26198setsignals(stlport_t *portp, int dtr, int rts) 4307static void stl_sc26198setsignals(struct stlport *portp, int dtr, int rts)
4312{ 4308{
4313 unsigned char iopioron, iopioroff; 4309 unsigned char iopioron, iopioroff;
4314 unsigned long flags; 4310 unsigned long flags;
@@ -4341,7 +4337,7 @@ static void stl_sc26198setsignals(stlport_t *portp, int dtr, int rts)
4341 * Return the state of the signals. 4337 * Return the state of the signals.
4342 */ 4338 */
4343 4339
4344static int stl_sc26198getsignals(stlport_t *portp) 4340static int stl_sc26198getsignals(struct stlport *portp)
4345{ 4341{
4346 unsigned char ipr; 4342 unsigned char ipr;
4347 unsigned long flags; 4343 unsigned long flags;
@@ -4370,7 +4366,7 @@ static int stl_sc26198getsignals(stlport_t *portp)
4370 * Enable/Disable the Transmitter and/or Receiver. 4366 * Enable/Disable the Transmitter and/or Receiver.
4371 */ 4367 */
4372 4368
4373static void stl_sc26198enablerxtx(stlport_t *portp, int rx, int tx) 4369static void stl_sc26198enablerxtx(struct stlport *portp, int rx, int tx)
4374{ 4370{
4375 unsigned char ccr; 4371 unsigned char ccr;
4376 unsigned long flags; 4372 unsigned long flags;
@@ -4401,7 +4397,7 @@ static void stl_sc26198enablerxtx(stlport_t *portp, int rx, int tx)
4401 * Start/stop the Transmitter and/or Receiver. 4397 * Start/stop the Transmitter and/or Receiver.
4402 */ 4398 */
4403 4399
4404static void stl_sc26198startrxtx(stlport_t *portp, int rx, int tx) 4400static void stl_sc26198startrxtx(struct stlport *portp, int rx, int tx)
4405{ 4401{
4406 unsigned char imr; 4402 unsigned char imr;
4407 unsigned long flags; 4403 unsigned long flags;
@@ -4434,7 +4430,7 @@ static void stl_sc26198startrxtx(stlport_t *portp, int rx, int tx)
4434 * Disable all interrupts from this port. 4430 * Disable all interrupts from this port.
4435 */ 4431 */
4436 4432
4437static void stl_sc26198disableintrs(stlport_t *portp) 4433static void stl_sc26198disableintrs(struct stlport *portp)
4438{ 4434{
4439 unsigned long flags; 4435 unsigned long flags;
4440 4436
@@ -4450,7 +4446,7 @@ static void stl_sc26198disableintrs(stlport_t *portp)
4450 4446
4451/*****************************************************************************/ 4447/*****************************************************************************/
4452 4448
4453static void stl_sc26198sendbreak(stlport_t *portp, int len) 4449static void stl_sc26198sendbreak(struct stlport *portp, int len)
4454{ 4450{
4455 unsigned long flags; 4451 unsigned long flags;
4456 4452
@@ -4474,7 +4470,7 @@ static void stl_sc26198sendbreak(stlport_t *portp, int len)
4474 * Take flow control actions... 4470 * Take flow control actions...
4475 */ 4471 */
4476 4472
4477static void stl_sc26198flowctrl(stlport_t *portp, int state) 4473static void stl_sc26198flowctrl(struct stlport *portp, int state)
4478{ 4474{
4479 struct tty_struct *tty; 4475 struct tty_struct *tty;
4480 unsigned long flags; 4476 unsigned long flags;
@@ -4543,7 +4539,7 @@ static void stl_sc26198flowctrl(stlport_t *portp, int state)
4543 * Send a flow control character. 4539 * Send a flow control character.
4544 */ 4540 */
4545 4541
4546static void stl_sc26198sendflow(stlport_t *portp, int state) 4542static void stl_sc26198sendflow(struct stlport *portp, int state)
4547{ 4543{
4548 struct tty_struct *tty; 4544 struct tty_struct *tty;
4549 unsigned long flags; 4545 unsigned long flags;
@@ -4582,7 +4578,7 @@ static void stl_sc26198sendflow(stlport_t *portp, int state)
4582 4578
4583/*****************************************************************************/ 4579/*****************************************************************************/
4584 4580
4585static void stl_sc26198flush(stlport_t *portp) 4581static void stl_sc26198flush(struct stlport *portp)
4586{ 4582{
4587 unsigned long flags; 4583 unsigned long flags;
4588 4584
@@ -4610,7 +4606,7 @@ static void stl_sc26198flush(stlport_t *portp)
4610 * check the port statusy register to be sure. 4606 * check the port statusy register to be sure.
4611 */ 4607 */
4612 4608
4613static int stl_sc26198datastate(stlport_t *portp) 4609static int stl_sc26198datastate(struct stlport *portp)
4614{ 4610{
4615 unsigned long flags; 4611 unsigned long flags;
4616 unsigned char sr; 4612 unsigned char sr;
@@ -4638,7 +4634,7 @@ static int stl_sc26198datastate(stlport_t *portp)
4638 * to process a command... 4634 * to process a command...
4639 */ 4635 */
4640 4636
4641static void stl_sc26198wait(stlport_t *portp) 4637static void stl_sc26198wait(struct stlport *portp)
4642{ 4638{
4643 int i; 4639 int i;
4644 4640
@@ -4659,7 +4655,7 @@ static void stl_sc26198wait(stlport_t *portp)
4659 * automatic flow control modes of the sc26198. 4655 * automatic flow control modes of the sc26198.
4660 */ 4656 */
4661 4657
4662static inline void stl_sc26198txunflow(stlport_t *portp, struct tty_struct *tty) 4658static inline void stl_sc26198txunflow(struct stlport *portp, struct tty_struct *tty)
4663{ 4659{
4664 unsigned char mr0; 4660 unsigned char mr0;
4665 4661
@@ -4677,9 +4673,9 @@ static inline void stl_sc26198txunflow(stlport_t *portp, struct tty_struct *tty)
4677 * Interrupt service routine for sc26198 panels. 4673 * Interrupt service routine for sc26198 panels.
4678 */ 4674 */
4679 4675
4680static void stl_sc26198intr(stlpanel_t *panelp, unsigned int iobase) 4676static void stl_sc26198intr(struct stlpanel *panelp, unsigned int iobase)
4681{ 4677{
4682 stlport_t *portp; 4678 struct stlport *portp;
4683 unsigned int iack; 4679 unsigned int iack;
4684 4680
4685 spin_lock(&brd_lock); 4681 spin_lock(&brd_lock);
@@ -4715,7 +4711,7 @@ static void stl_sc26198intr(stlpanel_t *panelp, unsigned int iobase)
4715 * be NULL if the buffer has been freed. 4711 * be NULL if the buffer has been freed.
4716 */ 4712 */
4717 4713
4718static void stl_sc26198txisr(stlport_t *portp) 4714static void stl_sc26198txisr(struct stlport *portp)
4719{ 4715{
4720 unsigned int ioaddr; 4716 unsigned int ioaddr;
4721 unsigned char mr0; 4717 unsigned char mr0;
@@ -4776,7 +4772,7 @@ static void stl_sc26198txisr(stlport_t *portp)
4776 * shutdown a port not in user context. Need to handle this case. 4772 * shutdown a port not in user context. Need to handle this case.
4777 */ 4773 */
4778 4774
4779static void stl_sc26198rxisr(stlport_t *portp, unsigned int iack) 4775static void stl_sc26198rxisr(struct stlport *portp, unsigned int iack)
4780{ 4776{
4781 struct tty_struct *tty; 4777 struct tty_struct *tty;
4782 unsigned int len, buflen, ioaddr; 4778 unsigned int len, buflen, ioaddr;
@@ -4830,7 +4826,7 @@ static void stl_sc26198rxisr(stlport_t *portp, unsigned int iack)
4830 * Process an RX bad character. 4826 * Process an RX bad character.
4831 */ 4827 */
4832 4828
4833static inline void stl_sc26198rxbadch(stlport_t *portp, unsigned char status, char ch) 4829static inline void stl_sc26198rxbadch(struct stlport *portp, unsigned char status, char ch)
4834{ 4830{
4835 struct tty_struct *tty; 4831 struct tty_struct *tty;
4836 unsigned int ioaddr; 4832 unsigned int ioaddr;
@@ -4888,7 +4884,7 @@ static inline void stl_sc26198rxbadch(stlport_t *portp, unsigned char status, ch
4888 * the FIFO). 4884 * the FIFO).
4889 */ 4885 */
4890 4886
4891static void stl_sc26198rxbadchars(stlport_t *portp) 4887static void stl_sc26198rxbadchars(struct stlport *portp)
4892{ 4888{
4893 unsigned char status, mr1; 4889 unsigned char status, mr1;
4894 char ch; 4890 char ch;
@@ -4921,7 +4917,7 @@ static void stl_sc26198rxbadchars(stlport_t *portp)
4921 * processing time. 4917 * processing time.
4922 */ 4918 */
4923 4919
4924static void stl_sc26198otherisr(stlport_t *portp, unsigned int iack) 4920static void stl_sc26198otherisr(struct stlport *portp, unsigned int iack)
4925{ 4921{
4926 unsigned char cir, ipr, xisr; 4922 unsigned char cir, ipr, xisr;
4927 4923