aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2006-12-08 05:39:18 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:29:00 -0500
commit1f8ec435e3516eb831bb98110cc2b2b28057154b (patch)
treeddcca323b7c0c42d815bd63ebead2b753a94422b /drivers
parenta3f8d9d5e1e00e5953d7727f0b8426224af2ca15 (diff)
[PATCH] Char: istallion, eliminate typedefs
Use only struct <name> instead of defining a new type <name_t>. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/istallion.c414
1 files changed, 206 insertions, 208 deletions
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index 2f56bc7d147b..75b1e0cbf586 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -101,14 +101,14 @@
101 * interrupt is required. 101 * interrupt is required.
102 */ 102 */
103 103
104typedef struct { 104struct stlconf {
105 int brdtype; 105 int brdtype;
106 int ioaddr1; 106 int ioaddr1;
107 int ioaddr2; 107 int ioaddr2;
108 unsigned long memaddr; 108 unsigned long memaddr;
109 int irq; 109 int irq;
110 int irqtype; 110 int irqtype;
111} stlconf_t; 111};
112 112
113static int stli_nrbrds; 113static int stli_nrbrds;
114 114
@@ -185,13 +185,13 @@ static struct ktermios stli_deftermios = {
185 */ 185 */
186static comstats_t stli_comstats; 186static comstats_t stli_comstats;
187static combrd_t stli_brdstats; 187static combrd_t stli_brdstats;
188static asystats_t stli_cdkstats; 188static struct asystats stli_cdkstats;
189static stlibrd_t stli_dummybrd; 189static struct stlibrd stli_dummybrd;
190static stliport_t stli_dummyport; 190static struct stliport stli_dummyport;
191 191
192/*****************************************************************************/ 192/*****************************************************************************/
193 193
194static stlibrd_t *stli_brds[STL_MAXBRDS]; 194static struct stlibrd *stli_brds[STL_MAXBRDS];
195 195
196static int stli_shared; 196static int stli_shared;
197 197
@@ -284,12 +284,10 @@ static char **stli_brdsp[] = {
284 * parse any module arguments. 284 * parse any module arguments.
285 */ 285 */
286 286
287typedef struct stlibrdtype { 287static struct stlibrdtype {
288 char *name; 288 char *name;
289 int type; 289 int type;
290} stlibrdtype_t; 290} stli_brdstr[] = {
291
292static stlibrdtype_t stli_brdstr[] = {
293 { "stallion", BRD_STALLION }, 291 { "stallion", BRD_STALLION },
294 { "1", BRD_STALLION }, 292 { "1", BRD_STALLION },
295 { "brumby", BRD_BRUMBY }, 293 { "brumby", BRD_BRUMBY },
@@ -594,7 +592,7 @@ static struct pci_driver stli_pcidriver;
594 * Prototype all functions in this driver! 592 * Prototype all functions in this driver!
595 */ 593 */
596 594
597static int stli_parsebrd(stlconf_t *confp, char **argp); 595static int stli_parsebrd(struct stlconf *confp, char **argp);
598static int stli_init(void); 596static int stli_init(void);
599static int stli_open(struct tty_struct *tty, struct file *filp); 597static int stli_open(struct tty_struct *tty, struct file *filp);
600static void stli_close(struct tty_struct *tty, struct file *filp); 598static void stli_close(struct tty_struct *tty, struct file *filp);
@@ -614,82 +612,82 @@ static void stli_breakctl(struct tty_struct *tty, int state);
614static void stli_waituntilsent(struct tty_struct *tty, int timeout); 612static void stli_waituntilsent(struct tty_struct *tty, int timeout);
615static void stli_sendxchar(struct tty_struct *tty, char ch); 613static void stli_sendxchar(struct tty_struct *tty, char ch);
616static void stli_hangup(struct tty_struct *tty); 614static void stli_hangup(struct tty_struct *tty);
617static int stli_portinfo(stlibrd_t *brdp, stliport_t *portp, int portnr, char *pos); 615static int stli_portinfo(struct stlibrd *brdp, struct stliport *portp, int portnr, char *pos);
618 616
619static int stli_brdinit(stlibrd_t *brdp); 617static int stli_brdinit(struct stlibrd *brdp);
620static int stli_startbrd(stlibrd_t *brdp); 618static int stli_startbrd(struct stlibrd *brdp);
621static ssize_t stli_memread(struct file *fp, char __user *buf, size_t count, loff_t *offp); 619static ssize_t stli_memread(struct file *fp, char __user *buf, size_t count, loff_t *offp);
622static ssize_t stli_memwrite(struct file *fp, const char __user *buf, size_t count, loff_t *offp); 620static ssize_t stli_memwrite(struct file *fp, const char __user *buf, size_t count, loff_t *offp);
623static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg); 621static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg);
624static void stli_brdpoll(stlibrd_t *brdp, cdkhdr_t __iomem *hdrp); 622static void stli_brdpoll(struct stlibrd *brdp, cdkhdr_t __iomem *hdrp);
625static void stli_poll(unsigned long arg); 623static void stli_poll(unsigned long arg);
626static int stli_hostcmd(stlibrd_t *brdp, stliport_t *portp); 624static int stli_hostcmd(struct stlibrd *brdp, struct stliport *portp);
627static int stli_initopen(stlibrd_t *brdp, stliport_t *portp); 625static int stli_initopen(struct stlibrd *brdp, struct stliport *portp);
628static int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait); 626static int stli_rawopen(struct stlibrd *brdp, struct stliport *portp, unsigned long arg, int wait);
629static int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait); 627static int stli_rawclose(struct stlibrd *brdp, struct stliport *portp, unsigned long arg, int wait);
630static int stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *filp); 628static int stli_waitcarrier(struct stlibrd *brdp, struct stliport *portp, struct file *filp);
631static void stli_dohangup(struct work_struct *); 629static void stli_dohangup(struct work_struct *);
632static int stli_setport(stliport_t *portp); 630static int stli_setport(struct stliport *portp);
633static int stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); 631static int stli_cmdwait(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback);
634static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); 632static void stli_sendcmd(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback);
635static void __stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); 633static void __stli_sendcmd(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback);
636static void stli_dodelaycmd(stliport_t *portp, cdkctrl_t __iomem *cp); 634static void stli_dodelaycmd(struct stliport *portp, cdkctrl_t __iomem *cp);
637static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct ktermios *tiosp); 635static void stli_mkasyport(struct stliport *portp, asyport_t *pp, struct ktermios *tiosp);
638static void stli_mkasysigs(asysigs_t *sp, int dtr, int rts); 636static void stli_mkasysigs(asysigs_t *sp, int dtr, int rts);
639static long stli_mktiocm(unsigned long sigvalue); 637static long stli_mktiocm(unsigned long sigvalue);
640static void stli_read(stlibrd_t *brdp, stliport_t *portp); 638static void stli_read(struct stlibrd *brdp, struct stliport *portp);
641static int stli_getserial(stliport_t *portp, struct serial_struct __user *sp); 639static int stli_getserial(struct stliport *portp, struct serial_struct __user *sp);
642static int stli_setserial(stliport_t *portp, struct serial_struct __user *sp); 640static int stli_setserial(struct stliport *portp, struct serial_struct __user *sp);
643static int stli_getbrdstats(combrd_t __user *bp); 641static int stli_getbrdstats(combrd_t __user *bp);
644static int stli_getportstats(stliport_t *portp, comstats_t __user *cp); 642static int stli_getportstats(struct stliport *portp, comstats_t __user *cp);
645static int stli_portcmdstats(stliport_t *portp); 643static int stli_portcmdstats(struct stliport *portp);
646static int stli_clrportstats(stliport_t *portp, comstats_t __user *cp); 644static int stli_clrportstats(struct stliport *portp, comstats_t __user *cp);
647static int stli_getportstruct(stliport_t __user *arg); 645static int stli_getportstruct(struct stliport __user *arg);
648static int stli_getbrdstruct(stlibrd_t __user *arg); 646static int stli_getbrdstruct(struct stlibrd __user *arg);
649static stlibrd_t *stli_allocbrd(void); 647static struct stlibrd *stli_allocbrd(void);
650 648
651static void stli_ecpinit(stlibrd_t *brdp); 649static void stli_ecpinit(struct stlibrd *brdp);
652static void stli_ecpenable(stlibrd_t *brdp); 650static void stli_ecpenable(struct stlibrd *brdp);
653static void stli_ecpdisable(stlibrd_t *brdp); 651static void stli_ecpdisable(struct stlibrd *brdp);
654static void __iomem *stli_ecpgetmemptr(stlibrd_t *brdp, unsigned long offset, int line); 652static void __iomem *stli_ecpgetmemptr(struct stlibrd *brdp, unsigned long offset, int line);
655static void stli_ecpreset(stlibrd_t *brdp); 653static void stli_ecpreset(struct stlibrd *brdp);
656static void stli_ecpintr(stlibrd_t *brdp); 654static void stli_ecpintr(struct stlibrd *brdp);
657static void stli_ecpeiinit(stlibrd_t *brdp); 655static void stli_ecpeiinit(struct stlibrd *brdp);
658static void stli_ecpeienable(stlibrd_t *brdp); 656static void stli_ecpeienable(struct stlibrd *brdp);
659static void stli_ecpeidisable(stlibrd_t *brdp); 657static void stli_ecpeidisable(struct stlibrd *brdp);
660static void __iomem *stli_ecpeigetmemptr(stlibrd_t *brdp, unsigned long offset, int line); 658static void __iomem *stli_ecpeigetmemptr(struct stlibrd *brdp, unsigned long offset, int line);
661static void stli_ecpeireset(stlibrd_t *brdp); 659static void stli_ecpeireset(struct stlibrd *brdp);
662static void stli_ecpmcenable(stlibrd_t *brdp); 660static void stli_ecpmcenable(struct stlibrd *brdp);
663static void stli_ecpmcdisable(stlibrd_t *brdp); 661static void stli_ecpmcdisable(struct stlibrd *brdp);
664static void __iomem *stli_ecpmcgetmemptr(stlibrd_t *brdp, unsigned long offset, int line); 662static void __iomem *stli_ecpmcgetmemptr(struct stlibrd *brdp, unsigned long offset, int line);
665static void stli_ecpmcreset(stlibrd_t *brdp); 663static void stli_ecpmcreset(struct stlibrd *brdp);
666static void stli_ecppciinit(stlibrd_t *brdp); 664static void stli_ecppciinit(struct stlibrd *brdp);
667static void __iomem *stli_ecppcigetmemptr(stlibrd_t *brdp, unsigned long offset, int line); 665static void __iomem *stli_ecppcigetmemptr(struct stlibrd *brdp, unsigned long offset, int line);
668static void stli_ecppcireset(stlibrd_t *brdp); 666static void stli_ecppcireset(struct stlibrd *brdp);
669 667
670static void stli_onbinit(stlibrd_t *brdp); 668static void stli_onbinit(struct stlibrd *brdp);
671static void stli_onbenable(stlibrd_t *brdp); 669static void stli_onbenable(struct stlibrd *brdp);
672static void stli_onbdisable(stlibrd_t *brdp); 670static void stli_onbdisable(struct stlibrd *brdp);
673static void __iomem *stli_onbgetmemptr(stlibrd_t *brdp, unsigned long offset, int line); 671static void __iomem *stli_onbgetmemptr(struct stlibrd *brdp, unsigned long offset, int line);
674static void stli_onbreset(stlibrd_t *brdp); 672static void stli_onbreset(struct stlibrd *brdp);
675static void stli_onbeinit(stlibrd_t *brdp); 673static void stli_onbeinit(struct stlibrd *brdp);
676static void stli_onbeenable(stlibrd_t *brdp); 674static void stli_onbeenable(struct stlibrd *brdp);
677static void stli_onbedisable(stlibrd_t *brdp); 675static void stli_onbedisable(struct stlibrd *brdp);
678static void __iomem *stli_onbegetmemptr(stlibrd_t *brdp, unsigned long offset, int line); 676static void __iomem *stli_onbegetmemptr(struct stlibrd *brdp, unsigned long offset, int line);
679static void stli_onbereset(stlibrd_t *brdp); 677static void stli_onbereset(struct stlibrd *brdp);
680static void stli_bbyinit(stlibrd_t *brdp); 678static void stli_bbyinit(struct stlibrd *brdp);
681static void __iomem *stli_bbygetmemptr(stlibrd_t *brdp, unsigned long offset, int line); 679static void __iomem *stli_bbygetmemptr(struct stlibrd *brdp, unsigned long offset, int line);
682static void stli_bbyreset(stlibrd_t *brdp); 680static void stli_bbyreset(struct stlibrd *brdp);
683static void stli_stalinit(stlibrd_t *brdp); 681static void stli_stalinit(struct stlibrd *brdp);
684static void __iomem *stli_stalgetmemptr(stlibrd_t *brdp, unsigned long offset, int line); 682static void __iomem *stli_stalgetmemptr(struct stlibrd *brdp, unsigned long offset, int line);
685static void stli_stalreset(stlibrd_t *brdp); 683static void stli_stalreset(struct stlibrd *brdp);
686 684
687static stliport_t *stli_getport(int brdnr, int panelnr, int portnr); 685static struct stliport *stli_getport(int brdnr, int panelnr, int portnr);
688 686
689static int stli_initecp(stlibrd_t *brdp); 687static int stli_initecp(struct stlibrd *brdp);
690static int stli_initonb(stlibrd_t *brdp); 688static int stli_initonb(struct stlibrd *brdp);
691static int stli_eisamemprobe(stlibrd_t *brdp); 689static int stli_eisamemprobe(struct stlibrd *brdp);
692static int stli_initports(stlibrd_t *brdp); 690static int stli_initports(struct stlibrd *brdp);
693 691
694/*****************************************************************************/ 692/*****************************************************************************/
695 693
@@ -727,9 +725,9 @@ static int stli_timeron;
727 725
728static struct class *istallion_class; 726static struct class *istallion_class;
729 727
730static void stli_cleanup_ports(stlibrd_t *brdp) 728static void stli_cleanup_ports(struct stlibrd *brdp)
731{ 729{
732 stliport_t *portp; 730 struct stliport *portp;
733 unsigned int j; 731 unsigned int j;
734 732
735 for (j = 0; j < STL_MAXPORTS; j++) { 733 for (j = 0; j < STL_MAXPORTS; j++) {
@@ -756,7 +754,7 @@ static int __init istallion_module_init(void)
756 754
757static void __exit istallion_module_exit(void) 755static void __exit istallion_module_exit(void)
758{ 756{
759 stlibrd_t *brdp; 757 struct stlibrd *brdp;
760 int i; 758 int i;
761 759
762 printk(KERN_INFO "Unloading %s: version %s\n", stli_drvtitle, 760 printk(KERN_INFO "Unloading %s: version %s\n", stli_drvtitle,
@@ -811,7 +809,7 @@ module_exit(istallion_module_exit);
811 * Parse the supplied argument string, into the board conf struct. 809 * Parse the supplied argument string, into the board conf struct.
812 */ 810 */
813 811
814static int stli_parsebrd(stlconf_t *confp, char **argp) 812static int stli_parsebrd(struct stlconf *confp, char **argp)
815{ 813{
816 char *sp; 814 char *sp;
817 int i; 815 int i;
@@ -843,8 +841,8 @@ static int stli_parsebrd(stlconf_t *confp, char **argp)
843 841
844static int stli_open(struct tty_struct *tty, struct file *filp) 842static int stli_open(struct tty_struct *tty, struct file *filp)
845{ 843{
846 stlibrd_t *brdp; 844 struct stlibrd *brdp;
847 stliport_t *portp; 845 struct stliport *portp;
848 unsigned int minordev; 846 unsigned int minordev;
849 int brdnr, portnr, rc; 847 int brdnr, portnr, rc;
850 848
@@ -938,8 +936,8 @@ static int stli_open(struct tty_struct *tty, struct file *filp)
938 936
939static void stli_close(struct tty_struct *tty, struct file *filp) 937static void stli_close(struct tty_struct *tty, struct file *filp)
940{ 938{
941 stlibrd_t *brdp; 939 struct stlibrd *brdp;
942 stliport_t *portp; 940 struct stliport *portp;
943 unsigned long flags; 941 unsigned long flags;
944 942
945 portp = tty->driver_data; 943 portp = tty->driver_data;
@@ -1016,7 +1014,7 @@ static void stli_close(struct tty_struct *tty, struct file *filp)
1016 * this still all happens pretty quickly. 1014 * this still all happens pretty quickly.
1017 */ 1015 */
1018 1016
1019static int stli_initopen(stlibrd_t *brdp, stliport_t *portp) 1017static int stli_initopen(struct stlibrd *brdp, struct stliport *portp)
1020{ 1018{
1021 struct tty_struct *tty; 1019 struct tty_struct *tty;
1022 asynotify_t nt; 1020 asynotify_t nt;
@@ -1064,7 +1062,7 @@ static int stli_initopen(stlibrd_t *brdp, stliport_t *portp)
1064 * to overlap. 1062 * to overlap.
1065 */ 1063 */
1066 1064
1067static int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait) 1065static int stli_rawopen(struct stlibrd *brdp, struct stliport *portp, unsigned long arg, int wait)
1068{ 1066{
1069 cdkhdr_t __iomem *hdrp; 1067 cdkhdr_t __iomem *hdrp;
1070 cdkctrl_t __iomem *cp; 1068 cdkctrl_t __iomem *cp;
@@ -1135,7 +1133,7 @@ static int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, i
1135 * wait is true then must have user context (to sleep). 1133 * wait is true then must have user context (to sleep).
1136 */ 1134 */
1137 1135
1138static int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait) 1136static int stli_rawclose(struct stlibrd *brdp, struct stliport *portp, unsigned long arg, int wait)
1139{ 1137{
1140 cdkhdr_t __iomem *hdrp; 1138 cdkhdr_t __iomem *hdrp;
1141 cdkctrl_t __iomem *cp; 1139 cdkctrl_t __iomem *cp;
@@ -1199,7 +1197,7 @@ static int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg,
1199 * to complete (as opposed to initiating the command then returning). 1197 * to complete (as opposed to initiating the command then returning).
1200 */ 1198 */
1201 1199
1202static int stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback) 1200static int stli_cmdwait(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback)
1203{ 1201{
1204 wait_event_interruptible(portp->raw_wait, 1202 wait_event_interruptible(portp->raw_wait,
1205 !test_bit(ST_CMDING, &portp->state)); 1203 !test_bit(ST_CMDING, &portp->state));
@@ -1225,9 +1223,9 @@ static int stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, v
1225 * waiting for the command to complete - so must have user context. 1223 * waiting for the command to complete - so must have user context.
1226 */ 1224 */
1227 1225
1228static int stli_setport(stliport_t *portp) 1226static int stli_setport(struct stliport *portp)
1229{ 1227{
1230 stlibrd_t *brdp; 1228 struct stlibrd *brdp;
1231 asyport_t aport; 1229 asyport_t aport;
1232 1230
1233 if (portp == NULL) 1231 if (portp == NULL)
@@ -1251,7 +1249,7 @@ static int stli_setport(stliport_t *portp)
1251 * maybe because if we are clocal then we don't need to wait... 1249 * maybe because if we are clocal then we don't need to wait...
1252 */ 1250 */
1253 1251
1254static int stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *filp) 1252static int stli_waitcarrier(struct stlibrd *brdp, struct stliport *portp, struct file *filp)
1255{ 1253{
1256 unsigned long flags; 1254 unsigned long flags;
1257 int rc, doclocal; 1255 int rc, doclocal;
@@ -1316,8 +1314,8 @@ static int stli_write(struct tty_struct *tty, const unsigned char *buf, int coun
1316 unsigned char __iomem *bits; 1314 unsigned char __iomem *bits;
1317 unsigned char __iomem *shbuf; 1315 unsigned char __iomem *shbuf;
1318 unsigned char *chbuf; 1316 unsigned char *chbuf;
1319 stliport_t *portp; 1317 struct stliport *portp;
1320 stlibrd_t *brdp; 1318 struct stlibrd *brdp;
1321 unsigned int len, stlen, head, tail, size; 1319 unsigned int len, stlen, head, tail, size;
1322 unsigned long flags; 1320 unsigned long flags;
1323 1321
@@ -1423,8 +1421,8 @@ static void stli_flushchars(struct tty_struct *tty)
1423 unsigned char __iomem *bits; 1421 unsigned char __iomem *bits;
1424 cdkasy_t __iomem *ap; 1422 cdkasy_t __iomem *ap;
1425 struct tty_struct *cooktty; 1423 struct tty_struct *cooktty;
1426 stliport_t *portp; 1424 struct stliport *portp;
1427 stlibrd_t *brdp; 1425 struct stlibrd *brdp;
1428 unsigned int len, stlen, head, tail, size, count, cooksize; 1426 unsigned int len, stlen, head, tail, size, count, cooksize;
1429 unsigned char *buf; 1427 unsigned char *buf;
1430 unsigned char __iomem *shbuf; 1428 unsigned char __iomem *shbuf;
@@ -1511,8 +1509,8 @@ static void stli_flushchars(struct tty_struct *tty)
1511static int stli_writeroom(struct tty_struct *tty) 1509static int stli_writeroom(struct tty_struct *tty)
1512{ 1510{
1513 cdkasyrq_t __iomem *rp; 1511 cdkasyrq_t __iomem *rp;
1514 stliport_t *portp; 1512 struct stliport *portp;
1515 stlibrd_t *brdp; 1513 struct stlibrd *brdp;
1516 unsigned int head, tail, len; 1514 unsigned int head, tail, len;
1517 unsigned long flags; 1515 unsigned long flags;
1518 1516
@@ -1564,8 +1562,8 @@ static int stli_writeroom(struct tty_struct *tty)
1564static int stli_charsinbuffer(struct tty_struct *tty) 1562static int stli_charsinbuffer(struct tty_struct *tty)
1565{ 1563{
1566 cdkasyrq_t __iomem *rp; 1564 cdkasyrq_t __iomem *rp;
1567 stliport_t *portp; 1565 struct stliport *portp;
1568 stlibrd_t *brdp; 1566 struct stlibrd *brdp;
1569 unsigned int head, tail, len; 1567 unsigned int head, tail, len;
1570 unsigned long flags; 1568 unsigned long flags;
1571 1569
@@ -1602,10 +1600,10 @@ static int stli_charsinbuffer(struct tty_struct *tty)
1602 * Generate the serial struct info. 1600 * Generate the serial struct info.
1603 */ 1601 */
1604 1602
1605static int stli_getserial(stliport_t *portp, struct serial_struct __user *sp) 1603static int stli_getserial(struct stliport *portp, struct serial_struct __user *sp)
1606{ 1604{
1607 struct serial_struct sio; 1605 struct serial_struct sio;
1608 stlibrd_t *brdp; 1606 struct stlibrd *brdp;
1609 1607
1610 memset(&sio, 0, sizeof(struct serial_struct)); 1608 memset(&sio, 0, sizeof(struct serial_struct));
1611 sio.type = PORT_UNKNOWN; 1609 sio.type = PORT_UNKNOWN;
@@ -1635,7 +1633,7 @@ static int stli_getserial(stliport_t *portp, struct serial_struct __user *sp)
1635 * just quietly ignore any requests to change irq, etc. 1633 * just quietly ignore any requests to change irq, etc.
1636 */ 1634 */
1637 1635
1638static int stli_setserial(stliport_t *portp, struct serial_struct __user *sp) 1636static int stli_setserial(struct stliport *portp, struct serial_struct __user *sp)
1639{ 1637{
1640 struct serial_struct sio; 1638 struct serial_struct sio;
1641 int rc; 1639 int rc;
@@ -1666,8 +1664,8 @@ static int stli_setserial(stliport_t *portp, struct serial_struct __user *sp)
1666 1664
1667static int stli_tiocmget(struct tty_struct *tty, struct file *file) 1665static int stli_tiocmget(struct tty_struct *tty, struct file *file)
1668{ 1666{
1669 stliport_t *portp = tty->driver_data; 1667 struct stliport *portp = tty->driver_data;
1670 stlibrd_t *brdp; 1668 struct stlibrd *brdp;
1671 int rc; 1669 int rc;
1672 1670
1673 if (portp == NULL) 1671 if (portp == NULL)
@@ -1690,8 +1688,8 @@ static int stli_tiocmget(struct tty_struct *tty, struct file *file)
1690static int stli_tiocmset(struct tty_struct *tty, struct file *file, 1688static int stli_tiocmset(struct tty_struct *tty, struct file *file,
1691 unsigned int set, unsigned int clear) 1689 unsigned int set, unsigned int clear)
1692{ 1690{
1693 stliport_t *portp = tty->driver_data; 1691 struct stliport *portp = tty->driver_data;
1694 stlibrd_t *brdp; 1692 struct stlibrd *brdp;
1695 int rts = -1, dtr = -1; 1693 int rts = -1, dtr = -1;
1696 1694
1697 if (portp == NULL) 1695 if (portp == NULL)
@@ -1721,8 +1719,8 @@ static int stli_tiocmset(struct tty_struct *tty, struct file *file,
1721 1719
1722static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) 1720static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg)
1723{ 1721{
1724 stliport_t *portp; 1722 struct stliport *portp;
1725 stlibrd_t *brdp; 1723 struct stlibrd *brdp;
1726 unsigned int ival; 1724 unsigned int ival;
1727 int rc; 1725 int rc;
1728 void __user *argp = (void __user *)arg; 1726 void __user *argp = (void __user *)arg;
@@ -1798,8 +1796,8 @@ static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cm
1798 1796
1799static void stli_settermios(struct tty_struct *tty, struct ktermios *old) 1797static void stli_settermios(struct tty_struct *tty, struct ktermios *old)
1800{ 1798{
1801 stliport_t *portp; 1799 struct stliport *portp;
1802 stlibrd_t *brdp; 1800 struct stlibrd *brdp;
1803 struct ktermios *tiosp; 1801 struct ktermios *tiosp;
1804 asyport_t aport; 1802 asyport_t aport;
1805 1803
@@ -1844,7 +1842,7 @@ static void stli_settermios(struct tty_struct *tty, struct ktermios *old)
1844 1842
1845static void stli_throttle(struct tty_struct *tty) 1843static void stli_throttle(struct tty_struct *tty)
1846{ 1844{
1847 stliport_t *portp = tty->driver_data; 1845 struct stliport *portp = tty->driver_data;
1848 if (portp == NULL) 1846 if (portp == NULL)
1849 return; 1847 return;
1850 set_bit(ST_RXSTOP, &portp->state); 1848 set_bit(ST_RXSTOP, &portp->state);
@@ -1860,7 +1858,7 @@ static void stli_throttle(struct tty_struct *tty)
1860 1858
1861static void stli_unthrottle(struct tty_struct *tty) 1859static void stli_unthrottle(struct tty_struct *tty)
1862{ 1860{
1863 stliport_t *portp = tty->driver_data; 1861 struct stliport *portp = tty->driver_data;
1864 if (portp == NULL) 1862 if (portp == NULL)
1865 return; 1863 return;
1866 clear_bit(ST_RXSTOP, &portp->state); 1864 clear_bit(ST_RXSTOP, &portp->state);
@@ -1899,7 +1897,7 @@ static void stli_start(struct tty_struct *tty)
1899 1897
1900static void stli_dohangup(struct work_struct *ugly_api) 1898static void stli_dohangup(struct work_struct *ugly_api)
1901{ 1899{
1902 stliport_t *portp = container_of(ugly_api, stliport_t, tqhangup); 1900 struct stliport *portp = container_of(ugly_api, struct stliport, tqhangup);
1903 if (portp->tty != NULL) { 1901 if (portp->tty != NULL) {
1904 tty_hangup(portp->tty); 1902 tty_hangup(portp->tty);
1905 } 1903 }
@@ -1916,8 +1914,8 @@ static void stli_dohangup(struct work_struct *ugly_api)
1916 1914
1917static void stli_hangup(struct tty_struct *tty) 1915static void stli_hangup(struct tty_struct *tty)
1918{ 1916{
1919 stliport_t *portp; 1917 struct stliport *portp;
1920 stlibrd_t *brdp; 1918 struct stlibrd *brdp;
1921 unsigned long flags; 1919 unsigned long flags;
1922 1920
1923 portp = tty->driver_data; 1921 portp = tty->driver_data;
@@ -1969,8 +1967,8 @@ static void stli_hangup(struct tty_struct *tty)
1969 1967
1970static void stli_flushbuffer(struct tty_struct *tty) 1968static void stli_flushbuffer(struct tty_struct *tty)
1971{ 1969{
1972 stliport_t *portp; 1970 struct stliport *portp;
1973 stlibrd_t *brdp; 1971 struct stlibrd *brdp;
1974 unsigned long ftype, flags; 1972 unsigned long ftype, flags;
1975 1973
1976 portp = tty->driver_data; 1974 portp = tty->driver_data;
@@ -2006,8 +2004,8 @@ static void stli_flushbuffer(struct tty_struct *tty)
2006 2004
2007static void stli_breakctl(struct tty_struct *tty, int state) 2005static void stli_breakctl(struct tty_struct *tty, int state)
2008{ 2006{
2009 stlibrd_t *brdp; 2007 struct stlibrd *brdp;
2010 stliport_t *portp; 2008 struct stliport *portp;
2011 long arg; 2009 long arg;
2012 2010
2013 portp = tty->driver_data; 2011 portp = tty->driver_data;
@@ -2027,7 +2025,7 @@ static void stli_breakctl(struct tty_struct *tty, int state)
2027 2025
2028static void stli_waituntilsent(struct tty_struct *tty, int timeout) 2026static void stli_waituntilsent(struct tty_struct *tty, int timeout)
2029{ 2027{
2030 stliport_t *portp; 2028 struct stliport *portp;
2031 unsigned long tend; 2029 unsigned long tend;
2032 2030
2033 if (tty == NULL) 2031 if (tty == NULL)
@@ -2053,8 +2051,8 @@ static void stli_waituntilsent(struct tty_struct *tty, int timeout)
2053 2051
2054static void stli_sendxchar(struct tty_struct *tty, char ch) 2052static void stli_sendxchar(struct tty_struct *tty, char ch)
2055{ 2053{
2056 stlibrd_t *brdp; 2054 struct stlibrd *brdp;
2057 stliport_t *portp; 2055 struct stliport *portp;
2058 asyctrl_t actrl; 2056 asyctrl_t actrl;
2059 2057
2060 portp = tty->driver_data; 2058 portp = tty->driver_data;
@@ -2088,7 +2086,7 @@ static void stli_sendxchar(struct tty_struct *tty, char ch)
2088 * short then padded with spaces). 2086 * short then padded with spaces).
2089 */ 2087 */
2090 2088
2091static int stli_portinfo(stlibrd_t *brdp, stliport_t *portp, int portnr, char *pos) 2089static int stli_portinfo(struct stlibrd *brdp, struct stliport *portp, int portnr, char *pos)
2092{ 2090{
2093 char *sp, *uart; 2091 char *sp, *uart;
2094 int rc, cnt; 2092 int rc, cnt;
@@ -2151,8 +2149,8 @@ static int stli_portinfo(stlibrd_t *brdp, stliport_t *portp, int portnr, char *p
2151 2149
2152static int stli_readproc(char *page, char **start, off_t off, int count, int *eof, void *data) 2150static int stli_readproc(char *page, char **start, off_t off, int count, int *eof, void *data)
2153{ 2151{
2154 stlibrd_t *brdp; 2152 struct stlibrd *brdp;
2155 stliport_t *portp; 2153 struct stliport *portp;
2156 int brdnr, portnr, totalport; 2154 int brdnr, portnr, totalport;
2157 int curoff, maxoff; 2155 int curoff, maxoff;
2158 char *pos; 2156 char *pos;
@@ -2223,7 +2221,7 @@ stli_readdone:
2223 * entry point) 2221 * entry point)
2224 */ 2222 */
2225 2223
2226static void __stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback) 2224static void __stli_sendcmd(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback)
2227{ 2225{
2228 cdkhdr_t __iomem *hdrp; 2226 cdkhdr_t __iomem *hdrp;
2229 cdkctrl_t __iomem *cp; 2227 cdkctrl_t __iomem *cp;
@@ -2259,7 +2257,7 @@ static void __stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd
2259 spin_unlock_irqrestore(&brd_lock, flags); 2257 spin_unlock_irqrestore(&brd_lock, flags);
2260} 2258}
2261 2259
2262static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback) 2260static void stli_sendcmd(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback)
2263{ 2261{
2264 unsigned long flags; 2262 unsigned long flags;
2265 2263
@@ -2278,7 +2276,7 @@ static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd,
2278 * more chars to unload. 2276 * more chars to unload.
2279 */ 2277 */
2280 2278
2281static void stli_read(stlibrd_t *brdp, stliport_t *portp) 2279static void stli_read(struct stlibrd *brdp, struct stliport *portp)
2282{ 2280{
2283 cdkasyrq_t __iomem *rp; 2281 cdkasyrq_t __iomem *rp;
2284 char __iomem *shbuf; 2282 char __iomem *shbuf;
@@ -2340,7 +2338,7 @@ static void stli_read(stlibrd_t *brdp, stliport_t *portp)
2340 * difficult to deal with them here. 2338 * difficult to deal with them here.
2341 */ 2339 */
2342 2340
2343static void stli_dodelaycmd(stliport_t *portp, cdkctrl_t __iomem *cp) 2341static void stli_dodelaycmd(struct stliport *portp, cdkctrl_t __iomem *cp)
2344{ 2342{
2345 int cmd; 2343 int cmd;
2346 2344
@@ -2388,7 +2386,7 @@ static void stli_dodelaycmd(stliport_t *portp, cdkctrl_t __iomem *cp)
2388 * then port is still busy, otherwise no longer busy. 2386 * then port is still busy, otherwise no longer busy.
2389 */ 2387 */
2390 2388
2391static int stli_hostcmd(stlibrd_t *brdp, stliport_t *portp) 2389static int stli_hostcmd(struct stlibrd *brdp, struct stliport *portp)
2392{ 2390{
2393 cdkasy_t __iomem *ap; 2391 cdkasy_t __iomem *ap;
2394 cdkctrl_t __iomem *cp; 2392 cdkctrl_t __iomem *cp;
@@ -2535,9 +2533,9 @@ static int stli_hostcmd(stlibrd_t *brdp, stliport_t *portp)
2535 * at the cdk header structure. 2533 * at the cdk header structure.
2536 */ 2534 */
2537 2535
2538static void stli_brdpoll(stlibrd_t *brdp, cdkhdr_t __iomem *hdrp) 2536static void stli_brdpoll(struct stlibrd *brdp, cdkhdr_t __iomem *hdrp)
2539{ 2537{
2540 stliport_t *portp; 2538 struct stliport *portp;
2541 unsigned char hostbits[(STL_MAXCHANS / 8) + 1]; 2539 unsigned char hostbits[(STL_MAXCHANS / 8) + 1];
2542 unsigned char slavebits[(STL_MAXCHANS / 8) + 1]; 2540 unsigned char slavebits[(STL_MAXCHANS / 8) + 1];
2543 unsigned char __iomem *slavep; 2541 unsigned char __iomem *slavep;
@@ -2604,7 +2602,7 @@ static void stli_brdpoll(stlibrd_t *brdp, cdkhdr_t __iomem *hdrp)
2604static void stli_poll(unsigned long arg) 2602static void stli_poll(unsigned long arg)
2605{ 2603{
2606 cdkhdr_t __iomem *hdrp; 2604 cdkhdr_t __iomem *hdrp;
2607 stlibrd_t *brdp; 2605 struct stlibrd *brdp;
2608 int brdnr; 2606 int brdnr;
2609 2607
2610 stli_timerlist.expires = STLI_TIMEOUT; 2608 stli_timerlist.expires = STLI_TIMEOUT;
@@ -2637,7 +2635,7 @@ static void stli_poll(unsigned long arg)
2637 * the slave. 2635 * the slave.
2638 */ 2636 */
2639 2637
2640static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct ktermios *tiosp) 2638static void stli_mkasyport(struct stliport *portp, asyport_t *pp, struct ktermios *tiosp)
2641{ 2639{
2642 memset(pp, 0, sizeof(asyport_t)); 2640 memset(pp, 0, sizeof(asyport_t));
2643 2641
@@ -2786,13 +2784,13 @@ static long stli_mktiocm(unsigned long sigvalue)
2786 * we need to do here is set up the appropriate per port data structures. 2784 * we need to do here is set up the appropriate per port data structures.
2787 */ 2785 */
2788 2786
2789static int stli_initports(stlibrd_t *brdp) 2787static int stli_initports(struct stlibrd *brdp)
2790{ 2788{
2791 stliport_t *portp; 2789 struct stliport *portp;
2792 int i, panelnr, panelport; 2790 int i, panelnr, panelport;
2793 2791
2794 for (i = 0, panelnr = 0, panelport = 0; (i < brdp->nrports); i++) { 2792 for (i = 0, panelnr = 0, panelport = 0; (i < brdp->nrports); i++) {
2795 portp = kzalloc(sizeof(stliport_t), GFP_KERNEL); 2793 portp = kzalloc(sizeof(struct stliport), GFP_KERNEL);
2796 if (!portp) { 2794 if (!portp) {
2797 printk("STALLION: failed to allocate port structure\n"); 2795 printk("STALLION: failed to allocate port structure\n");
2798 continue; 2796 continue;
@@ -2826,7 +2824,7 @@ static int stli_initports(stlibrd_t *brdp)
2826 * All the following routines are board specific hardware operations. 2824 * All the following routines are board specific hardware operations.
2827 */ 2825 */
2828 2826
2829static void stli_ecpinit(stlibrd_t *brdp) 2827static void stli_ecpinit(struct stlibrd *brdp)
2830{ 2828{
2831 unsigned long memconf; 2829 unsigned long memconf;
2832 2830
@@ -2841,21 +2839,21 @@ static void stli_ecpinit(stlibrd_t *brdp)
2841 2839
2842/*****************************************************************************/ 2840/*****************************************************************************/
2843 2841
2844static void stli_ecpenable(stlibrd_t *brdp) 2842static void stli_ecpenable(struct stlibrd *brdp)
2845{ 2843{
2846 outb(ECP_ATENABLE, (brdp->iobase + ECP_ATCONFR)); 2844 outb(ECP_ATENABLE, (brdp->iobase + ECP_ATCONFR));
2847} 2845}
2848 2846
2849/*****************************************************************************/ 2847/*****************************************************************************/
2850 2848
2851static void stli_ecpdisable(stlibrd_t *brdp) 2849static void stli_ecpdisable(struct stlibrd *brdp)
2852{ 2850{
2853 outb(ECP_ATDISABLE, (brdp->iobase + ECP_ATCONFR)); 2851 outb(ECP_ATDISABLE, (brdp->iobase + ECP_ATCONFR));
2854} 2852}
2855 2853
2856/*****************************************************************************/ 2854/*****************************************************************************/
2857 2855
2858static void __iomem *stli_ecpgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) 2856static void __iomem *stli_ecpgetmemptr(struct stlibrd *brdp, unsigned long offset, int line)
2859{ 2857{
2860 void __iomem *ptr; 2858 void __iomem *ptr;
2861 unsigned char val; 2859 unsigned char val;
@@ -2876,7 +2874,7 @@ static void __iomem *stli_ecpgetmemptr(stlibrd_t *brdp, unsigned long offset, in
2876 2874
2877/*****************************************************************************/ 2875/*****************************************************************************/
2878 2876
2879static void stli_ecpreset(stlibrd_t *brdp) 2877static void stli_ecpreset(struct stlibrd *brdp)
2880{ 2878{
2881 outb(ECP_ATSTOP, (brdp->iobase + ECP_ATCONFR)); 2879 outb(ECP_ATSTOP, (brdp->iobase + ECP_ATCONFR));
2882 udelay(10); 2880 udelay(10);
@@ -2886,7 +2884,7 @@ static void stli_ecpreset(stlibrd_t *brdp)
2886 2884
2887/*****************************************************************************/ 2885/*****************************************************************************/
2888 2886
2889static void stli_ecpintr(stlibrd_t *brdp) 2887static void stli_ecpintr(struct stlibrd *brdp)
2890{ 2888{
2891 outb(0x1, brdp->iobase); 2889 outb(0x1, brdp->iobase);
2892} 2890}
@@ -2897,7 +2895,7 @@ static void stli_ecpintr(stlibrd_t *brdp)
2897 * The following set of functions act on ECP EISA boards. 2895 * The following set of functions act on ECP EISA boards.
2898 */ 2896 */
2899 2897
2900static void stli_ecpeiinit(stlibrd_t *brdp) 2898static void stli_ecpeiinit(struct stlibrd *brdp)
2901{ 2899{
2902 unsigned long memconf; 2900 unsigned long memconf;
2903 2901
@@ -2915,21 +2913,21 @@ static void stli_ecpeiinit(stlibrd_t *brdp)
2915 2913
2916/*****************************************************************************/ 2914/*****************************************************************************/
2917 2915
2918static void stli_ecpeienable(stlibrd_t *brdp) 2916static void stli_ecpeienable(struct stlibrd *brdp)
2919{ 2917{
2920 outb(ECP_EIENABLE, (brdp->iobase + ECP_EICONFR)); 2918 outb(ECP_EIENABLE, (brdp->iobase + ECP_EICONFR));
2921} 2919}
2922 2920
2923/*****************************************************************************/ 2921/*****************************************************************************/
2924 2922
2925static void stli_ecpeidisable(stlibrd_t *brdp) 2923static void stli_ecpeidisable(struct stlibrd *brdp)
2926{ 2924{
2927 outb(ECP_EIDISABLE, (brdp->iobase + ECP_EICONFR)); 2925 outb(ECP_EIDISABLE, (brdp->iobase + ECP_EICONFR));
2928} 2926}
2929 2927
2930/*****************************************************************************/ 2928/*****************************************************************************/
2931 2929
2932static void __iomem *stli_ecpeigetmemptr(stlibrd_t *brdp, unsigned long offset, int line) 2930static void __iomem *stli_ecpeigetmemptr(struct stlibrd *brdp, unsigned long offset, int line)
2933{ 2931{
2934 void __iomem *ptr; 2932 void __iomem *ptr;
2935 unsigned char val; 2933 unsigned char val;
@@ -2953,7 +2951,7 @@ static void __iomem *stli_ecpeigetmemptr(stlibrd_t *brdp, unsigned long offset,
2953 2951
2954/*****************************************************************************/ 2952/*****************************************************************************/
2955 2953
2956static void stli_ecpeireset(stlibrd_t *brdp) 2954static void stli_ecpeireset(struct stlibrd *brdp)
2957{ 2955{
2958 outb(ECP_EISTOP, (brdp->iobase + ECP_EICONFR)); 2956 outb(ECP_EISTOP, (brdp->iobase + ECP_EICONFR));
2959 udelay(10); 2957 udelay(10);
@@ -2967,21 +2965,21 @@ static void stli_ecpeireset(stlibrd_t *brdp)
2967 * The following set of functions act on ECP MCA boards. 2965 * The following set of functions act on ECP MCA boards.
2968 */ 2966 */
2969 2967
2970static void stli_ecpmcenable(stlibrd_t *brdp) 2968static void stli_ecpmcenable(struct stlibrd *brdp)
2971{ 2969{
2972 outb(ECP_MCENABLE, (brdp->iobase + ECP_MCCONFR)); 2970 outb(ECP_MCENABLE, (brdp->iobase + ECP_MCCONFR));
2973} 2971}
2974 2972
2975/*****************************************************************************/ 2973/*****************************************************************************/
2976 2974
2977static void stli_ecpmcdisable(stlibrd_t *brdp) 2975static void stli_ecpmcdisable(struct stlibrd *brdp)
2978{ 2976{
2979 outb(ECP_MCDISABLE, (brdp->iobase + ECP_MCCONFR)); 2977 outb(ECP_MCDISABLE, (brdp->iobase + ECP_MCCONFR));
2980} 2978}
2981 2979
2982/*****************************************************************************/ 2980/*****************************************************************************/
2983 2981
2984static void __iomem *stli_ecpmcgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) 2982static void __iomem *stli_ecpmcgetmemptr(struct stlibrd *brdp, unsigned long offset, int line)
2985{ 2983{
2986 void __iomem *ptr; 2984 void __iomem *ptr;
2987 unsigned char val; 2985 unsigned char val;
@@ -3002,7 +3000,7 @@ static void __iomem *stli_ecpmcgetmemptr(stlibrd_t *brdp, unsigned long offset,
3002 3000
3003/*****************************************************************************/ 3001/*****************************************************************************/
3004 3002
3005static void stli_ecpmcreset(stlibrd_t *brdp) 3003static void stli_ecpmcreset(struct stlibrd *brdp)
3006{ 3004{
3007 outb(ECP_MCSTOP, (brdp->iobase + ECP_MCCONFR)); 3005 outb(ECP_MCSTOP, (brdp->iobase + ECP_MCCONFR));
3008 udelay(10); 3006 udelay(10);
@@ -3016,7 +3014,7 @@ static void stli_ecpmcreset(stlibrd_t *brdp)
3016 * The following set of functions act on ECP PCI boards. 3014 * The following set of functions act on ECP PCI boards.
3017 */ 3015 */
3018 3016
3019static void stli_ecppciinit(stlibrd_t *brdp) 3017static void stli_ecppciinit(struct stlibrd *brdp)
3020{ 3018{
3021 outb(ECP_PCISTOP, (brdp->iobase + ECP_PCICONFR)); 3019 outb(ECP_PCISTOP, (brdp->iobase + ECP_PCICONFR));
3022 udelay(10); 3020 udelay(10);
@@ -3026,7 +3024,7 @@ static void stli_ecppciinit(stlibrd_t *brdp)
3026 3024
3027/*****************************************************************************/ 3025/*****************************************************************************/
3028 3026
3029static void __iomem *stli_ecppcigetmemptr(stlibrd_t *brdp, unsigned long offset, int line) 3027static void __iomem *stli_ecppcigetmemptr(struct stlibrd *brdp, unsigned long offset, int line)
3030{ 3028{
3031 void __iomem *ptr; 3029 void __iomem *ptr;
3032 unsigned char val; 3030 unsigned char val;
@@ -3047,7 +3045,7 @@ static void __iomem *stli_ecppcigetmemptr(stlibrd_t *brdp, unsigned long offset,
3047 3045
3048/*****************************************************************************/ 3046/*****************************************************************************/
3049 3047
3050static void stli_ecppcireset(stlibrd_t *brdp) 3048static void stli_ecppcireset(struct stlibrd *brdp)
3051{ 3049{
3052 outb(ECP_PCISTOP, (brdp->iobase + ECP_PCICONFR)); 3050 outb(ECP_PCISTOP, (brdp->iobase + ECP_PCICONFR));
3053 udelay(10); 3051 udelay(10);
@@ -3061,7 +3059,7 @@ static void stli_ecppcireset(stlibrd_t *brdp)
3061 * The following routines act on ONboards. 3059 * The following routines act on ONboards.
3062 */ 3060 */
3063 3061
3064static void stli_onbinit(stlibrd_t *brdp) 3062static void stli_onbinit(struct stlibrd *brdp)
3065{ 3063{
3066 unsigned long memconf; 3064 unsigned long memconf;
3067 3065
@@ -3078,21 +3076,21 @@ static void stli_onbinit(stlibrd_t *brdp)
3078 3076
3079/*****************************************************************************/ 3077/*****************************************************************************/
3080 3078
3081static void stli_onbenable(stlibrd_t *brdp) 3079static void stli_onbenable(struct stlibrd *brdp)
3082{ 3080{
3083 outb((brdp->enabval | ONB_ATENABLE), (brdp->iobase + ONB_ATCONFR)); 3081 outb((brdp->enabval | ONB_ATENABLE), (brdp->iobase + ONB_ATCONFR));
3084} 3082}
3085 3083
3086/*****************************************************************************/ 3084/*****************************************************************************/
3087 3085
3088static void stli_onbdisable(stlibrd_t *brdp) 3086static void stli_onbdisable(struct stlibrd *brdp)
3089{ 3087{
3090 outb((brdp->enabval | ONB_ATDISABLE), (brdp->iobase + ONB_ATCONFR)); 3088 outb((brdp->enabval | ONB_ATDISABLE), (brdp->iobase + ONB_ATCONFR));
3091} 3089}
3092 3090
3093/*****************************************************************************/ 3091/*****************************************************************************/
3094 3092
3095static void __iomem *stli_onbgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) 3093static void __iomem *stli_onbgetmemptr(struct stlibrd *brdp, unsigned long offset, int line)
3096{ 3094{
3097 void __iomem *ptr; 3095 void __iomem *ptr;
3098 3096
@@ -3109,7 +3107,7 @@ static void __iomem *stli_onbgetmemptr(stlibrd_t *brdp, unsigned long offset, in
3109 3107
3110/*****************************************************************************/ 3108/*****************************************************************************/
3111 3109
3112static void stli_onbreset(stlibrd_t *brdp) 3110static void stli_onbreset(struct stlibrd *brdp)
3113{ 3111{
3114 outb(ONB_ATSTOP, (brdp->iobase + ONB_ATCONFR)); 3112 outb(ONB_ATSTOP, (brdp->iobase + ONB_ATCONFR));
3115 udelay(10); 3113 udelay(10);
@@ -3123,7 +3121,7 @@ static void stli_onbreset(stlibrd_t *brdp)
3123 * The following routines act on ONboard EISA. 3121 * The following routines act on ONboard EISA.
3124 */ 3122 */
3125 3123
3126static void stli_onbeinit(stlibrd_t *brdp) 3124static void stli_onbeinit(struct stlibrd *brdp)
3127{ 3125{
3128 unsigned long memconf; 3126 unsigned long memconf;
3129 3127
@@ -3143,21 +3141,21 @@ static void stli_onbeinit(stlibrd_t *brdp)
3143 3141
3144/*****************************************************************************/ 3142/*****************************************************************************/
3145 3143
3146static void stli_onbeenable(stlibrd_t *brdp) 3144static void stli_onbeenable(struct stlibrd *brdp)
3147{ 3145{
3148 outb(ONB_EIENABLE, (brdp->iobase + ONB_EICONFR)); 3146 outb(ONB_EIENABLE, (brdp->iobase + ONB_EICONFR));
3149} 3147}
3150 3148
3151/*****************************************************************************/ 3149/*****************************************************************************/
3152 3150
3153static void stli_onbedisable(stlibrd_t *brdp) 3151static void stli_onbedisable(struct stlibrd *brdp)
3154{ 3152{
3155 outb(ONB_EIDISABLE, (brdp->iobase + ONB_EICONFR)); 3153 outb(ONB_EIDISABLE, (brdp->iobase + ONB_EICONFR));
3156} 3154}
3157 3155
3158/*****************************************************************************/ 3156/*****************************************************************************/
3159 3157
3160static void __iomem *stli_onbegetmemptr(stlibrd_t *brdp, unsigned long offset, int line) 3158static void __iomem *stli_onbegetmemptr(struct stlibrd *brdp, unsigned long offset, int line)
3161{ 3159{
3162 void __iomem *ptr; 3160 void __iomem *ptr;
3163 unsigned char val; 3161 unsigned char val;
@@ -3181,7 +3179,7 @@ static void __iomem *stli_onbegetmemptr(stlibrd_t *brdp, unsigned long offset, i
3181 3179
3182/*****************************************************************************/ 3180/*****************************************************************************/
3183 3181
3184static void stli_onbereset(stlibrd_t *brdp) 3182static void stli_onbereset(struct stlibrd *brdp)
3185{ 3183{
3186 outb(ONB_EISTOP, (brdp->iobase + ONB_EICONFR)); 3184 outb(ONB_EISTOP, (brdp->iobase + ONB_EICONFR));
3187 udelay(10); 3185 udelay(10);
@@ -3195,7 +3193,7 @@ static void stli_onbereset(stlibrd_t *brdp)
3195 * The following routines act on Brumby boards. 3193 * The following routines act on Brumby boards.
3196 */ 3194 */
3197 3195
3198static void stli_bbyinit(stlibrd_t *brdp) 3196static void stli_bbyinit(struct stlibrd *brdp)
3199{ 3197{
3200 outb(BBY_ATSTOP, (brdp->iobase + BBY_ATCONFR)); 3198 outb(BBY_ATSTOP, (brdp->iobase + BBY_ATCONFR));
3201 udelay(10); 3199 udelay(10);
@@ -3207,7 +3205,7 @@ static void stli_bbyinit(stlibrd_t *brdp)
3207 3205
3208/*****************************************************************************/ 3206/*****************************************************************************/
3209 3207
3210static void __iomem *stli_bbygetmemptr(stlibrd_t *brdp, unsigned long offset, int line) 3208static void __iomem *stli_bbygetmemptr(struct stlibrd *brdp, unsigned long offset, int line)
3211{ 3209{
3212 void __iomem *ptr; 3210 void __iomem *ptr;
3213 unsigned char val; 3211 unsigned char val;
@@ -3222,7 +3220,7 @@ static void __iomem *stli_bbygetmemptr(stlibrd_t *brdp, unsigned long offset, in
3222 3220
3223/*****************************************************************************/ 3221/*****************************************************************************/
3224 3222
3225static void stli_bbyreset(stlibrd_t *brdp) 3223static void stli_bbyreset(struct stlibrd *brdp)
3226{ 3224{
3227 outb(BBY_ATSTOP, (brdp->iobase + BBY_ATCONFR)); 3225 outb(BBY_ATSTOP, (brdp->iobase + BBY_ATCONFR));
3228 udelay(10); 3226 udelay(10);
@@ -3236,7 +3234,7 @@ static void stli_bbyreset(stlibrd_t *brdp)
3236 * The following routines act on original old Stallion boards. 3234 * The following routines act on original old Stallion boards.
3237 */ 3235 */
3238 3236
3239static void stli_stalinit(stlibrd_t *brdp) 3237static void stli_stalinit(struct stlibrd *brdp)
3240{ 3238{
3241 outb(0x1, brdp->iobase); 3239 outb(0x1, brdp->iobase);
3242 mdelay(1000); 3240 mdelay(1000);
@@ -3244,7 +3242,7 @@ static void stli_stalinit(stlibrd_t *brdp)
3244 3242
3245/*****************************************************************************/ 3243/*****************************************************************************/
3246 3244
3247static void __iomem *stli_stalgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) 3245static void __iomem *stli_stalgetmemptr(struct stlibrd *brdp, unsigned long offset, int line)
3248{ 3246{
3249 BUG_ON(offset > brdp->memsize); 3247 BUG_ON(offset > brdp->memsize);
3250 return brdp->membase + (offset % STAL_PAGESIZE); 3248 return brdp->membase + (offset % STAL_PAGESIZE);
@@ -3252,7 +3250,7 @@ static void __iomem *stli_stalgetmemptr(stlibrd_t *brdp, unsigned long offset, i
3252 3250
3253/*****************************************************************************/ 3251/*****************************************************************************/
3254 3252
3255static void stli_stalreset(stlibrd_t *brdp) 3253static void stli_stalreset(struct stlibrd *brdp)
3256{ 3254{
3257 u32 __iomem *vecp; 3255 u32 __iomem *vecp;
3258 3256
@@ -3269,7 +3267,7 @@ static void stli_stalreset(stlibrd_t *brdp)
3269 * board types. 3267 * board types.
3270 */ 3268 */
3271 3269
3272static int stli_initecp(stlibrd_t *brdp) 3270static int stli_initecp(struct stlibrd *brdp)
3273{ 3271{
3274 cdkecpsig_t sig; 3272 cdkecpsig_t sig;
3275 cdkecpsig_t __iomem *sigsp; 3273 cdkecpsig_t __iomem *sigsp;
@@ -3415,7 +3413,7 @@ static int stli_initecp(stlibrd_t *brdp)
3415 * This handles only these board types. 3413 * This handles only these board types.
3416 */ 3414 */
3417 3415
3418static int stli_initonb(stlibrd_t *brdp) 3416static int stli_initonb(struct stlibrd *brdp)
3419{ 3417{
3420 cdkonbsig_t sig; 3418 cdkonbsig_t sig;
3421 cdkonbsig_t __iomem *sigsp; 3419 cdkonbsig_t __iomem *sigsp;
@@ -3566,13 +3564,13 @@ static int stli_initonb(stlibrd_t *brdp)
3566 * read in the memory map, and get the show on the road... 3564 * read in the memory map, and get the show on the road...
3567 */ 3565 */
3568 3566
3569static int stli_startbrd(stlibrd_t *brdp) 3567static int stli_startbrd(struct stlibrd *brdp)
3570{ 3568{
3571 cdkhdr_t __iomem *hdrp; 3569 cdkhdr_t __iomem *hdrp;
3572 cdkmem_t __iomem *memp; 3570 cdkmem_t __iomem *memp;
3573 cdkasy_t __iomem *ap; 3571 cdkasy_t __iomem *ap;
3574 unsigned long flags; 3572 unsigned long flags;
3575 stliport_t *portp; 3573 struct stliport *portp;
3576 int portnr, nrdevs, i, rc = 0; 3574 int portnr, nrdevs, i, rc = 0;
3577 u32 memoff; 3575 u32 memoff;
3578 3576
@@ -3673,7 +3671,7 @@ stli_donestartup:
3673 * Probe and initialize the specified board. 3671 * Probe and initialize the specified board.
3674 */ 3672 */
3675 3673
3676static int __devinit stli_brdinit(stlibrd_t *brdp) 3674static int __devinit stli_brdinit(struct stlibrd *brdp)
3677{ 3675{
3678 stli_brds[brdp->brdnr] = brdp; 3676 stli_brds[brdp->brdnr] = brdp;
3679 3677
@@ -3720,7 +3718,7 @@ static int __devinit stli_brdinit(stlibrd_t *brdp)
3720 * might be. This is a bit if hack, but it is the best we can do. 3718 * might be. This is a bit if hack, but it is the best we can do.
3721 */ 3719 */
3722 3720
3723static int stli_eisamemprobe(stlibrd_t *brdp) 3721static int stli_eisamemprobe(struct stlibrd *brdp)
3724{ 3722{
3725 cdkecpsig_t ecpsig, __iomem *ecpsigp; 3723 cdkecpsig_t ecpsig, __iomem *ecpsigp;
3726 cdkonbsig_t onbsig, __iomem *onbsigp; 3724 cdkonbsig_t onbsig, __iomem *onbsigp;
@@ -3835,7 +3833,7 @@ static int stli_getbrdnr(void)
3835 3833
3836static int stli_findeisabrds(void) 3834static int stli_findeisabrds(void)
3837{ 3835{
3838 stlibrd_t *brdp; 3836 struct stlibrd *brdp;
3839 unsigned int iobase, eid; 3837 unsigned int iobase, eid;
3840 int i; 3838 int i;
3841 3839
@@ -3912,7 +3910,7 @@ static int stli_findeisabrds(void)
3912static int __devinit stli_pciprobe(struct pci_dev *pdev, 3910static int __devinit stli_pciprobe(struct pci_dev *pdev,
3913 const struct pci_device_id *ent) 3911 const struct pci_device_id *ent)
3914{ 3912{
3915 stlibrd_t *brdp; 3913 struct stlibrd *brdp;
3916 int retval = -EIO; 3914 int retval = -EIO;
3917 3915
3918 retval = pci_enable_device(pdev); 3916 retval = pci_enable_device(pdev);
@@ -3951,7 +3949,7 @@ err:
3951 3949
3952static void stli_pciremove(struct pci_dev *pdev) 3950static void stli_pciremove(struct pci_dev *pdev)
3953{ 3951{
3954 stlibrd_t *brdp = pci_get_drvdata(pdev); 3952 struct stlibrd *brdp = pci_get_drvdata(pdev);
3955 3953
3956 stli_cleanup_ports(brdp); 3954 stli_cleanup_ports(brdp);
3957 3955
@@ -3975,14 +3973,14 @@ static struct pci_driver stli_pcidriver = {
3975 * Allocate a new board structure. Fill out the basic info in it. 3973 * Allocate a new board structure. Fill out the basic info in it.
3976 */ 3974 */
3977 3975
3978static stlibrd_t *stli_allocbrd(void) 3976static struct stlibrd *stli_allocbrd(void)
3979{ 3977{
3980 stlibrd_t *brdp; 3978 struct stlibrd *brdp;
3981 3979
3982 brdp = kzalloc(sizeof(stlibrd_t), GFP_KERNEL); 3980 brdp = kzalloc(sizeof(struct stlibrd), GFP_KERNEL);
3983 if (!brdp) { 3981 if (!brdp) {
3984 printk(KERN_ERR "STALLION: failed to allocate memory " 3982 printk(KERN_ERR "STALLION: failed to allocate memory "
3985 "(size=%Zd)\n", sizeof(stlibrd_t)); 3983 "(size=%Zd)\n", sizeof(struct stlibrd));
3986 return NULL; 3984 return NULL;
3987 } 3985 }
3988 brdp->magic = STLI_BOARDMAGIC; 3986 brdp->magic = STLI_BOARDMAGIC;
@@ -3998,8 +3996,8 @@ static stlibrd_t *stli_allocbrd(void)
3998 3996
3999static int stli_initbrds(void) 3997static int stli_initbrds(void)
4000{ 3998{
4001 stlibrd_t *brdp, *nxtbrdp; 3999 struct stlibrd *brdp, *nxtbrdp;
4002 stlconf_t conf; 4000 struct stlconf conf;
4003 int i, j, retval; 4001 int i, j, retval;
4004 4002
4005 for (stli_nrbrds = 0; stli_nrbrds < ARRAY_SIZE(stli_brdsp); 4003 for (stli_nrbrds = 0; stli_nrbrds < ARRAY_SIZE(stli_brdsp);
@@ -4075,7 +4073,7 @@ static ssize_t stli_memread(struct file *fp, char __user *buf, size_t count, lof
4075{ 4073{
4076 unsigned long flags; 4074 unsigned long flags;
4077 void __iomem *memptr; 4075 void __iomem *memptr;
4078 stlibrd_t *brdp; 4076 struct stlibrd *brdp;
4079 int brdnr, size, n; 4077 int brdnr, size, n;
4080 void *p; 4078 void *p;
4081 loff_t off = *offp; 4079 loff_t off = *offp;
@@ -4138,7 +4136,7 @@ static ssize_t stli_memwrite(struct file *fp, const char __user *buf, size_t cou
4138{ 4136{
4139 unsigned long flags; 4137 unsigned long flags;
4140 void __iomem *memptr; 4138 void __iomem *memptr;
4141 stlibrd_t *brdp; 4139 struct stlibrd *brdp;
4142 char __user *chbuf; 4140 char __user *chbuf;
4143 int brdnr, size, n; 4141 int brdnr, size, n;
4144 void *p; 4142 void *p;
@@ -4199,7 +4197,7 @@ out:
4199 4197
4200static int stli_getbrdstats(combrd_t __user *bp) 4198static int stli_getbrdstats(combrd_t __user *bp)
4201{ 4199{
4202 stlibrd_t *brdp; 4200 struct stlibrd *brdp;
4203 int i; 4201 int i;
4204 4202
4205 if (copy_from_user(&stli_brdstats, bp, sizeof(combrd_t))) 4203 if (copy_from_user(&stli_brdstats, bp, sizeof(combrd_t)))
@@ -4236,9 +4234,9 @@ static int stli_getbrdstats(combrd_t __user *bp)
4236 * Resolve the referenced port number into a port struct pointer. 4234 * Resolve the referenced port number into a port struct pointer.
4237 */ 4235 */
4238 4236
4239static stliport_t *stli_getport(int brdnr, int panelnr, int portnr) 4237static struct stliport *stli_getport(int brdnr, int panelnr, int portnr)
4240{ 4238{
4241 stlibrd_t *brdp; 4239 struct stlibrd *brdp;
4242 int i; 4240 int i;
4243 4241
4244 if (brdnr < 0 || brdnr >= STL_MAXBRDS) 4242 if (brdnr < 0 || brdnr >= STL_MAXBRDS)
@@ -4261,10 +4259,10 @@ static stliport_t *stli_getport(int brdnr, int panelnr, int portnr)
4261 * what port to get stats for (used through board control device). 4259 * what port to get stats for (used through board control device).
4262 */ 4260 */
4263 4261
4264static int stli_portcmdstats(stliport_t *portp) 4262static int stli_portcmdstats(struct stliport *portp)
4265{ 4263{
4266 unsigned long flags; 4264 unsigned long flags;
4267 stlibrd_t *brdp; 4265 struct stlibrd *brdp;
4268 int rc; 4266 int rc;
4269 4267
4270 memset(&stli_comstats, 0, sizeof(comstats_t)); 4268 memset(&stli_comstats, 0, sizeof(comstats_t));
@@ -4335,9 +4333,9 @@ static int stli_portcmdstats(stliport_t *portp)
4335 * what port to get stats for (used through board control device). 4333 * what port to get stats for (used through board control device).
4336 */ 4334 */
4337 4335
4338static int stli_getportstats(stliport_t *portp, comstats_t __user *cp) 4336static int stli_getportstats(struct stliport *portp, comstats_t __user *cp)
4339{ 4337{
4340 stlibrd_t *brdp; 4338 struct stlibrd *brdp;
4341 int rc; 4339 int rc;
4342 4340
4343 if (!portp) { 4341 if (!portp) {
@@ -4366,9 +4364,9 @@ static int stli_getportstats(stliport_t *portp, comstats_t __user *cp)
4366 * Clear the port stats structure. We also return it zeroed out... 4364 * Clear the port stats structure. We also return it zeroed out...
4367 */ 4365 */
4368 4366
4369static int stli_clrportstats(stliport_t *portp, comstats_t __user *cp) 4367static int stli_clrportstats(struct stliport *portp, comstats_t __user *cp)
4370{ 4368{
4371 stlibrd_t *brdp; 4369 struct stlibrd *brdp;
4372 int rc; 4370 int rc;
4373 4371
4374 if (!portp) { 4372 if (!portp) {
@@ -4405,17 +4403,17 @@ static int stli_clrportstats(stliport_t *portp, comstats_t __user *cp)
4405 * Return the entire driver ports structure to a user app. 4403 * Return the entire driver ports structure to a user app.
4406 */ 4404 */
4407 4405
4408static int stli_getportstruct(stliport_t __user *arg) 4406static int stli_getportstruct(struct stliport __user *arg)
4409{ 4407{
4410 stliport_t *portp; 4408 struct stliport *portp;
4411 4409
4412 if (copy_from_user(&stli_dummyport, arg, sizeof(stliport_t))) 4410 if (copy_from_user(&stli_dummyport, arg, sizeof(struct stliport)))
4413 return -EFAULT; 4411 return -EFAULT;
4414 portp = stli_getport(stli_dummyport.brdnr, stli_dummyport.panelnr, 4412 portp = stli_getport(stli_dummyport.brdnr, stli_dummyport.panelnr,
4415 stli_dummyport.portnr); 4413 stli_dummyport.portnr);
4416 if (!portp) 4414 if (!portp)
4417 return -ENODEV; 4415 return -ENODEV;
4418 if (copy_to_user(arg, portp, sizeof(stliport_t))) 4416 if (copy_to_user(arg, portp, sizeof(struct stliport)))
4419 return -EFAULT; 4417 return -EFAULT;
4420 return 0; 4418 return 0;
4421} 4419}
@@ -4426,18 +4424,18 @@ static int stli_getportstruct(stliport_t __user *arg)
4426 * Return the entire driver board structure to a user app. 4424 * Return the entire driver board structure to a user app.
4427 */ 4425 */
4428 4426
4429static int stli_getbrdstruct(stlibrd_t __user *arg) 4427static int stli_getbrdstruct(struct stlibrd __user *arg)
4430{ 4428{
4431 stlibrd_t *brdp; 4429 struct stlibrd *brdp;
4432 4430
4433 if (copy_from_user(&stli_dummybrd, arg, sizeof(stlibrd_t))) 4431 if (copy_from_user(&stli_dummybrd, arg, sizeof(struct stlibrd)))
4434 return -EFAULT; 4432 return -EFAULT;
4435 if ((stli_dummybrd.brdnr < 0) || (stli_dummybrd.brdnr >= STL_MAXBRDS)) 4433 if ((stli_dummybrd.brdnr < 0) || (stli_dummybrd.brdnr >= STL_MAXBRDS))
4436 return -ENODEV; 4434 return -ENODEV;
4437 brdp = stli_brds[stli_dummybrd.brdnr]; 4435 brdp = stli_brds[stli_dummybrd.brdnr];
4438 if (!brdp) 4436 if (!brdp)
4439 return -ENODEV; 4437 return -ENODEV;
4440 if (copy_to_user(arg, brdp, sizeof(stlibrd_t))) 4438 if (copy_to_user(arg, brdp, sizeof(struct stlibrd)))
4441 return -EFAULT; 4439 return -EFAULT;
4442 return 0; 4440 return 0;
4443} 4441}
@@ -4452,7 +4450,7 @@ static int stli_getbrdstruct(stlibrd_t __user *arg)
4452 4450
4453static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg) 4451static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg)
4454{ 4452{
4455 stlibrd_t *brdp; 4453 struct stlibrd *brdp;
4456 int brdnr, rc, done; 4454 int brdnr, rc, done;
4457 void __user *argp = (void __user *)arg; 4455 void __user *argp = (void __user *)arg;
4458 4456