diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2006-12-08 05:39:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:29:00 -0500 |
commit | 1f8ec435e3516eb831bb98110cc2b2b28057154b (patch) | |
tree | ddcca323b7c0c42d815bd63ebead2b753a94422b /drivers/char/istallion.c | |
parent | a3f8d9d5e1e00e5953d7727f0b8426224af2ca15 (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/char/istallion.c')
-rw-r--r-- | drivers/char/istallion.c | 414 |
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 | ||
104 | typedef struct { | 104 | struct 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 | ||
113 | static int stli_nrbrds; | 113 | static int stli_nrbrds; |
114 | 114 | ||
@@ -185,13 +185,13 @@ static struct ktermios stli_deftermios = { | |||
185 | */ | 185 | */ |
186 | static comstats_t stli_comstats; | 186 | static comstats_t stli_comstats; |
187 | static combrd_t stli_brdstats; | 187 | static combrd_t stli_brdstats; |
188 | static asystats_t stli_cdkstats; | 188 | static struct asystats stli_cdkstats; |
189 | static stlibrd_t stli_dummybrd; | 189 | static struct stlibrd stli_dummybrd; |
190 | static stliport_t stli_dummyport; | 190 | static struct stliport stli_dummyport; |
191 | 191 | ||
192 | /*****************************************************************************/ | 192 | /*****************************************************************************/ |
193 | 193 | ||
194 | static stlibrd_t *stli_brds[STL_MAXBRDS]; | 194 | static struct stlibrd *stli_brds[STL_MAXBRDS]; |
195 | 195 | ||
196 | static int stli_shared; | 196 | static 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 | ||
287 | typedef struct stlibrdtype { | 287 | static struct stlibrdtype { |
288 | char *name; | 288 | char *name; |
289 | int type; | 289 | int type; |
290 | } stlibrdtype_t; | 290 | } stli_brdstr[] = { |
291 | |||
292 | static 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 | ||
597 | static int stli_parsebrd(stlconf_t *confp, char **argp); | 595 | static int stli_parsebrd(struct stlconf *confp, char **argp); |
598 | static int stli_init(void); | 596 | static int stli_init(void); |
599 | static int stli_open(struct tty_struct *tty, struct file *filp); | 597 | static int stli_open(struct tty_struct *tty, struct file *filp); |
600 | static void stli_close(struct tty_struct *tty, struct file *filp); | 598 | static void stli_close(struct tty_struct *tty, struct file *filp); |
@@ -614,82 +612,82 @@ static void stli_breakctl(struct tty_struct *tty, int state); | |||
614 | static void stli_waituntilsent(struct tty_struct *tty, int timeout); | 612 | static void stli_waituntilsent(struct tty_struct *tty, int timeout); |
615 | static void stli_sendxchar(struct tty_struct *tty, char ch); | 613 | static void stli_sendxchar(struct tty_struct *tty, char ch); |
616 | static void stli_hangup(struct tty_struct *tty); | 614 | static void stli_hangup(struct tty_struct *tty); |
617 | static int stli_portinfo(stlibrd_t *brdp, stliport_t *portp, int portnr, char *pos); | 615 | static int stli_portinfo(struct stlibrd *brdp, struct stliport *portp, int portnr, char *pos); |
618 | 616 | ||
619 | static int stli_brdinit(stlibrd_t *brdp); | 617 | static int stli_brdinit(struct stlibrd *brdp); |
620 | static int stli_startbrd(stlibrd_t *brdp); | 618 | static int stli_startbrd(struct stlibrd *brdp); |
621 | static ssize_t stli_memread(struct file *fp, char __user *buf, size_t count, loff_t *offp); | 619 | static ssize_t stli_memread(struct file *fp, char __user *buf, size_t count, loff_t *offp); |
622 | static ssize_t stli_memwrite(struct file *fp, const char __user *buf, size_t count, loff_t *offp); | 620 | static ssize_t stli_memwrite(struct file *fp, const char __user *buf, size_t count, loff_t *offp); |
623 | static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg); | 621 | static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg); |
624 | static void stli_brdpoll(stlibrd_t *brdp, cdkhdr_t __iomem *hdrp); | 622 | static void stli_brdpoll(struct stlibrd *brdp, cdkhdr_t __iomem *hdrp); |
625 | static void stli_poll(unsigned long arg); | 623 | static void stli_poll(unsigned long arg); |
626 | static int stli_hostcmd(stlibrd_t *brdp, stliport_t *portp); | 624 | static int stli_hostcmd(struct stlibrd *brdp, struct stliport *portp); |
627 | static int stli_initopen(stlibrd_t *brdp, stliport_t *portp); | 625 | static int stli_initopen(struct stlibrd *brdp, struct stliport *portp); |
628 | static int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait); | 626 | static int stli_rawopen(struct stlibrd *brdp, struct stliport *portp, unsigned long arg, int wait); |
629 | static int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait); | 627 | static int stli_rawclose(struct stlibrd *brdp, struct stliport *portp, unsigned long arg, int wait); |
630 | static int stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *filp); | 628 | static int stli_waitcarrier(struct stlibrd *brdp, struct stliport *portp, struct file *filp); |
631 | static void stli_dohangup(struct work_struct *); | 629 | static void stli_dohangup(struct work_struct *); |
632 | static int stli_setport(stliport_t *portp); | 630 | static int stli_setport(struct stliport *portp); |
633 | static int stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); | 631 | static int stli_cmdwait(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback); |
634 | static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); | 632 | static void stli_sendcmd(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback); |
635 | static void __stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); | 633 | static void __stli_sendcmd(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback); |
636 | static void stli_dodelaycmd(stliport_t *portp, cdkctrl_t __iomem *cp); | 634 | static void stli_dodelaycmd(struct stliport *portp, cdkctrl_t __iomem *cp); |
637 | static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct ktermios *tiosp); | 635 | static void stli_mkasyport(struct stliport *portp, asyport_t *pp, struct ktermios *tiosp); |
638 | static void stli_mkasysigs(asysigs_t *sp, int dtr, int rts); | 636 | static void stli_mkasysigs(asysigs_t *sp, int dtr, int rts); |
639 | static long stli_mktiocm(unsigned long sigvalue); | 637 | static long stli_mktiocm(unsigned long sigvalue); |
640 | static void stli_read(stlibrd_t *brdp, stliport_t *portp); | 638 | static void stli_read(struct stlibrd *brdp, struct stliport *portp); |
641 | static int stli_getserial(stliport_t *portp, struct serial_struct __user *sp); | 639 | static int stli_getserial(struct stliport *portp, struct serial_struct __user *sp); |
642 | static int stli_setserial(stliport_t *portp, struct serial_struct __user *sp); | 640 | static int stli_setserial(struct stliport *portp, struct serial_struct __user *sp); |
643 | static int stli_getbrdstats(combrd_t __user *bp); | 641 | static int stli_getbrdstats(combrd_t __user *bp); |
644 | static int stli_getportstats(stliport_t *portp, comstats_t __user *cp); | 642 | static int stli_getportstats(struct stliport *portp, comstats_t __user *cp); |
645 | static int stli_portcmdstats(stliport_t *portp); | 643 | static int stli_portcmdstats(struct stliport *portp); |
646 | static int stli_clrportstats(stliport_t *portp, comstats_t __user *cp); | 644 | static int stli_clrportstats(struct stliport *portp, comstats_t __user *cp); |
647 | static int stli_getportstruct(stliport_t __user *arg); | 645 | static int stli_getportstruct(struct stliport __user *arg); |
648 | static int stli_getbrdstruct(stlibrd_t __user *arg); | 646 | static int stli_getbrdstruct(struct stlibrd __user *arg); |
649 | static stlibrd_t *stli_allocbrd(void); | 647 | static struct stlibrd *stli_allocbrd(void); |
650 | 648 | ||
651 | static void stli_ecpinit(stlibrd_t *brdp); | 649 | static void stli_ecpinit(struct stlibrd *brdp); |
652 | static void stli_ecpenable(stlibrd_t *brdp); | 650 | static void stli_ecpenable(struct stlibrd *brdp); |
653 | static void stli_ecpdisable(stlibrd_t *brdp); | 651 | static void stli_ecpdisable(struct stlibrd *brdp); |
654 | static void __iomem *stli_ecpgetmemptr(stlibrd_t *brdp, unsigned long offset, int line); | 652 | static void __iomem *stli_ecpgetmemptr(struct stlibrd *brdp, unsigned long offset, int line); |
655 | static void stli_ecpreset(stlibrd_t *brdp); | 653 | static void stli_ecpreset(struct stlibrd *brdp); |
656 | static void stli_ecpintr(stlibrd_t *brdp); | 654 | static void stli_ecpintr(struct stlibrd *brdp); |
657 | static void stli_ecpeiinit(stlibrd_t *brdp); | 655 | static void stli_ecpeiinit(struct stlibrd *brdp); |
658 | static void stli_ecpeienable(stlibrd_t *brdp); | 656 | static void stli_ecpeienable(struct stlibrd *brdp); |
659 | static void stli_ecpeidisable(stlibrd_t *brdp); | 657 | static void stli_ecpeidisable(struct stlibrd *brdp); |
660 | static void __iomem *stli_ecpeigetmemptr(stlibrd_t *brdp, unsigned long offset, int line); | 658 | static void __iomem *stli_ecpeigetmemptr(struct stlibrd *brdp, unsigned long offset, int line); |
661 | static void stli_ecpeireset(stlibrd_t *brdp); | 659 | static void stli_ecpeireset(struct stlibrd *brdp); |
662 | static void stli_ecpmcenable(stlibrd_t *brdp); | 660 | static void stli_ecpmcenable(struct stlibrd *brdp); |
663 | static void stli_ecpmcdisable(stlibrd_t *brdp); | 661 | static void stli_ecpmcdisable(struct stlibrd *brdp); |
664 | static void __iomem *stli_ecpmcgetmemptr(stlibrd_t *brdp, unsigned long offset, int line); | 662 | static void __iomem *stli_ecpmcgetmemptr(struct stlibrd *brdp, unsigned long offset, int line); |
665 | static void stli_ecpmcreset(stlibrd_t *brdp); | 663 | static void stli_ecpmcreset(struct stlibrd *brdp); |
666 | static void stli_ecppciinit(stlibrd_t *brdp); | 664 | static void stli_ecppciinit(struct stlibrd *brdp); |
667 | static void __iomem *stli_ecppcigetmemptr(stlibrd_t *brdp, unsigned long offset, int line); | 665 | static void __iomem *stli_ecppcigetmemptr(struct stlibrd *brdp, unsigned long offset, int line); |
668 | static void stli_ecppcireset(stlibrd_t *brdp); | 666 | static void stli_ecppcireset(struct stlibrd *brdp); |
669 | 667 | ||
670 | static void stli_onbinit(stlibrd_t *brdp); | 668 | static void stli_onbinit(struct stlibrd *brdp); |
671 | static void stli_onbenable(stlibrd_t *brdp); | 669 | static void stli_onbenable(struct stlibrd *brdp); |
672 | static void stli_onbdisable(stlibrd_t *brdp); | 670 | static void stli_onbdisable(struct stlibrd *brdp); |
673 | static void __iomem *stli_onbgetmemptr(stlibrd_t *brdp, unsigned long offset, int line); | 671 | static void __iomem *stli_onbgetmemptr(struct stlibrd *brdp, unsigned long offset, int line); |
674 | static void stli_onbreset(stlibrd_t *brdp); | 672 | static void stli_onbreset(struct stlibrd *brdp); |
675 | static void stli_onbeinit(stlibrd_t *brdp); | 673 | static void stli_onbeinit(struct stlibrd *brdp); |
676 | static void stli_onbeenable(stlibrd_t *brdp); | 674 | static void stli_onbeenable(struct stlibrd *brdp); |
677 | static void stli_onbedisable(stlibrd_t *brdp); | 675 | static void stli_onbedisable(struct stlibrd *brdp); |
678 | static void __iomem *stli_onbegetmemptr(stlibrd_t *brdp, unsigned long offset, int line); | 676 | static void __iomem *stli_onbegetmemptr(struct stlibrd *brdp, unsigned long offset, int line); |
679 | static void stli_onbereset(stlibrd_t *brdp); | 677 | static void stli_onbereset(struct stlibrd *brdp); |
680 | static void stli_bbyinit(stlibrd_t *brdp); | 678 | static void stli_bbyinit(struct stlibrd *brdp); |
681 | static void __iomem *stli_bbygetmemptr(stlibrd_t *brdp, unsigned long offset, int line); | 679 | static void __iomem *stli_bbygetmemptr(struct stlibrd *brdp, unsigned long offset, int line); |
682 | static void stli_bbyreset(stlibrd_t *brdp); | 680 | static void stli_bbyreset(struct stlibrd *brdp); |
683 | static void stli_stalinit(stlibrd_t *brdp); | 681 | static void stli_stalinit(struct stlibrd *brdp); |
684 | static void __iomem *stli_stalgetmemptr(stlibrd_t *brdp, unsigned long offset, int line); | 682 | static void __iomem *stli_stalgetmemptr(struct stlibrd *brdp, unsigned long offset, int line); |
685 | static void stli_stalreset(stlibrd_t *brdp); | 683 | static void stli_stalreset(struct stlibrd *brdp); |
686 | 684 | ||
687 | static stliport_t *stli_getport(int brdnr, int panelnr, int portnr); | 685 | static struct stliport *stli_getport(int brdnr, int panelnr, int portnr); |
688 | 686 | ||
689 | static int stli_initecp(stlibrd_t *brdp); | 687 | static int stli_initecp(struct stlibrd *brdp); |
690 | static int stli_initonb(stlibrd_t *brdp); | 688 | static int stli_initonb(struct stlibrd *brdp); |
691 | static int stli_eisamemprobe(stlibrd_t *brdp); | 689 | static int stli_eisamemprobe(struct stlibrd *brdp); |
692 | static int stli_initports(stlibrd_t *brdp); | 690 | static int stli_initports(struct stlibrd *brdp); |
693 | 691 | ||
694 | /*****************************************************************************/ | 692 | /*****************************************************************************/ |
695 | 693 | ||
@@ -727,9 +725,9 @@ static int stli_timeron; | |||
727 | 725 | ||
728 | static struct class *istallion_class; | 726 | static struct class *istallion_class; |
729 | 727 | ||
730 | static void stli_cleanup_ports(stlibrd_t *brdp) | 728 | static 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 | ||
757 | static void __exit istallion_module_exit(void) | 755 | static 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 | ||
814 | static int stli_parsebrd(stlconf_t *confp, char **argp) | 812 | static 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 | ||
844 | static int stli_open(struct tty_struct *tty, struct file *filp) | 842 | static 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 | ||
939 | static void stli_close(struct tty_struct *tty, struct file *filp) | 937 | static 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 | ||
1019 | static int stli_initopen(stlibrd_t *brdp, stliport_t *portp) | 1017 | static 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 | ||
1067 | static int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait) | 1065 | static 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 | ||
1138 | static int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait) | 1136 | static 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 | ||
1202 | static int stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback) | 1200 | static 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 | ||
1228 | static int stli_setport(stliport_t *portp) | 1226 | static 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 | ||
1254 | static int stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *filp) | 1252 | static 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) | |||
1511 | static int stli_writeroom(struct tty_struct *tty) | 1509 | static 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) | |||
1564 | static int stli_charsinbuffer(struct tty_struct *tty) | 1562 | static 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 | ||
1605 | static int stli_getserial(stliport_t *portp, struct serial_struct __user *sp) | 1603 | static 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 | ||
1638 | static int stli_setserial(stliport_t *portp, struct serial_struct __user *sp) | 1636 | static 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 | ||
1667 | static int stli_tiocmget(struct tty_struct *tty, struct file *file) | 1665 | static 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) | |||
1690 | static int stli_tiocmset(struct tty_struct *tty, struct file *file, | 1688 | static 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 | ||
1722 | static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) | 1720 | static 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 | ||
1799 | static void stli_settermios(struct tty_struct *tty, struct ktermios *old) | 1797 | static 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 | ||
1845 | static void stli_throttle(struct tty_struct *tty) | 1843 | static 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 | ||
1861 | static void stli_unthrottle(struct tty_struct *tty) | 1859 | static 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 | ||
1900 | static void stli_dohangup(struct work_struct *ugly_api) | 1898 | static 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 | ||
1917 | static void stli_hangup(struct tty_struct *tty) | 1915 | static 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 | ||
1970 | static void stli_flushbuffer(struct tty_struct *tty) | 1968 | static 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 | ||
2007 | static void stli_breakctl(struct tty_struct *tty, int state) | 2005 | static 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 | ||
2028 | static void stli_waituntilsent(struct tty_struct *tty, int timeout) | 2026 | static 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 | ||
2054 | static void stli_sendxchar(struct tty_struct *tty, char ch) | 2052 | static 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 | ||
2091 | static int stli_portinfo(stlibrd_t *brdp, stliport_t *portp, int portnr, char *pos) | 2089 | static 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 | ||
2152 | static int stli_readproc(char *page, char **start, off_t off, int count, int *eof, void *data) | 2150 | static 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 | ||
2226 | static void __stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback) | 2224 | static 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 | ||
2262 | static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback) | 2260 | static 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 | ||
2281 | static void stli_read(stlibrd_t *brdp, stliport_t *portp) | 2279 | static 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 | ||
2343 | static void stli_dodelaycmd(stliport_t *portp, cdkctrl_t __iomem *cp) | 2341 | static 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 | ||
2391 | static int stli_hostcmd(stlibrd_t *brdp, stliport_t *portp) | 2389 | static 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 | ||
2538 | static void stli_brdpoll(stlibrd_t *brdp, cdkhdr_t __iomem *hdrp) | 2536 | static 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) | |||
2604 | static void stli_poll(unsigned long arg) | 2602 | static 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 | ||
2640 | static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct ktermios *tiosp) | 2638 | static 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 | ||
2789 | static int stli_initports(stlibrd_t *brdp) | 2787 | static 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 | ||
2829 | static void stli_ecpinit(stlibrd_t *brdp) | 2827 | static 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 | ||
2844 | static void stli_ecpenable(stlibrd_t *brdp) | 2842 | static 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 | ||
2851 | static void stli_ecpdisable(stlibrd_t *brdp) | 2849 | static 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 | ||
2858 | static void __iomem *stli_ecpgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) | 2856 | static 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 | ||
2879 | static void stli_ecpreset(stlibrd_t *brdp) | 2877 | static 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 | ||
2889 | static void stli_ecpintr(stlibrd_t *brdp) | 2887 | static 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 | ||
2900 | static void stli_ecpeiinit(stlibrd_t *brdp) | 2898 | static 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 | ||
2918 | static void stli_ecpeienable(stlibrd_t *brdp) | 2916 | static 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 | ||
2925 | static void stli_ecpeidisable(stlibrd_t *brdp) | 2923 | static 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 | ||
2932 | static void __iomem *stli_ecpeigetmemptr(stlibrd_t *brdp, unsigned long offset, int line) | 2930 | static 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 | ||
2956 | static void stli_ecpeireset(stlibrd_t *brdp) | 2954 | static 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 | ||
2970 | static void stli_ecpmcenable(stlibrd_t *brdp) | 2968 | static 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 | ||
2977 | static void stli_ecpmcdisable(stlibrd_t *brdp) | 2975 | static 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 | ||
2984 | static void __iomem *stli_ecpmcgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) | 2982 | static 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 | ||
3005 | static void stli_ecpmcreset(stlibrd_t *brdp) | 3003 | static 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 | ||
3019 | static void stli_ecppciinit(stlibrd_t *brdp) | 3017 | static 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 | ||
3029 | static void __iomem *stli_ecppcigetmemptr(stlibrd_t *brdp, unsigned long offset, int line) | 3027 | static 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 | ||
3050 | static void stli_ecppcireset(stlibrd_t *brdp) | 3048 | static 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 | ||
3064 | static void stli_onbinit(stlibrd_t *brdp) | 3062 | static 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 | ||
3081 | static void stli_onbenable(stlibrd_t *brdp) | 3079 | static 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 | ||
3088 | static void stli_onbdisable(stlibrd_t *brdp) | 3086 | static 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 | ||
3095 | static void __iomem *stli_onbgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) | 3093 | static 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 | ||
3112 | static void stli_onbreset(stlibrd_t *brdp) | 3110 | static 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 | ||
3126 | static void stli_onbeinit(stlibrd_t *brdp) | 3124 | static 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 | ||
3146 | static void stli_onbeenable(stlibrd_t *brdp) | 3144 | static 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 | ||
3153 | static void stli_onbedisable(stlibrd_t *brdp) | 3151 | static 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 | ||
3160 | static void __iomem *stli_onbegetmemptr(stlibrd_t *brdp, unsigned long offset, int line) | 3158 | static 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 | ||
3184 | static void stli_onbereset(stlibrd_t *brdp) | 3182 | static 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 | ||
3198 | static void stli_bbyinit(stlibrd_t *brdp) | 3196 | static 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 | ||
3210 | static void __iomem *stli_bbygetmemptr(stlibrd_t *brdp, unsigned long offset, int line) | 3208 | static 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 | ||
3225 | static void stli_bbyreset(stlibrd_t *brdp) | 3223 | static 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 | ||
3239 | static void stli_stalinit(stlibrd_t *brdp) | 3237 | static 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 | ||
3247 | static void __iomem *stli_stalgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) | 3245 | static 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 | ||
3255 | static void stli_stalreset(stlibrd_t *brdp) | 3253 | static 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 | ||
3272 | static int stli_initecp(stlibrd_t *brdp) | 3270 | static 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 | ||
3418 | static int stli_initonb(stlibrd_t *brdp) | 3416 | static 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 | ||
3569 | static int stli_startbrd(stlibrd_t *brdp) | 3567 | static 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 | ||
3676 | static int __devinit stli_brdinit(stlibrd_t *brdp) | 3674 | static 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 | ||
3723 | static int stli_eisamemprobe(stlibrd_t *brdp) | 3721 | static 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 | ||
3836 | static int stli_findeisabrds(void) | 3834 | static 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) | |||
3912 | static int __devinit stli_pciprobe(struct pci_dev *pdev, | 3910 | static 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 | ||
3952 | static void stli_pciremove(struct pci_dev *pdev) | 3950 | static 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 | ||
3978 | static stlibrd_t *stli_allocbrd(void) | 3976 | static 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 | ||
3999 | static int stli_initbrds(void) | 3997 | static 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 | ||
4200 | static int stli_getbrdstats(combrd_t __user *bp) | 4198 | static 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 | ||
4239 | static stliport_t *stli_getport(int brdnr, int panelnr, int portnr) | 4237 | static 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 | ||
4264 | static int stli_portcmdstats(stliport_t *portp) | 4262 | static 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 | ||
4338 | static int stli_getportstats(stliport_t *portp, comstats_t __user *cp) | 4336 | static 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 | ||
4369 | static int stli_clrportstats(stliport_t *portp, comstats_t __user *cp) | 4367 | static 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 | ||
4408 | static int stli_getportstruct(stliport_t __user *arg) | 4406 | static 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 | ||
4429 | static int stli_getbrdstruct(stlibrd_t __user *arg) | 4427 | static 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 | ||
4453 | static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg) | 4451 | static 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 | ||