Commit 1f8ec435 authored by Jiri Slaby's avatar Jiri Slaby Committed by Linus Torvalds

[PATCH] Char: istallion, eliminate typedefs

Use only struct <name> instead of defining a new type <name_t>.
Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a3f8d9d5
...@@ -101,14 +101,14 @@ ...@@ -101,14 +101,14 @@
* interrupt is required. * interrupt is required.
*/ */
typedef struct { struct stlconf {
int brdtype; int brdtype;
int ioaddr1; int ioaddr1;
int ioaddr2; int ioaddr2;
unsigned long memaddr; unsigned long memaddr;
int irq; int irq;
int irqtype; int irqtype;
} stlconf_t; };
static int stli_nrbrds; static int stli_nrbrds;
...@@ -185,13 +185,13 @@ static struct ktermios stli_deftermios = { ...@@ -185,13 +185,13 @@ static struct ktermios stli_deftermios = {
*/ */
static comstats_t stli_comstats; static comstats_t stli_comstats;
static combrd_t stli_brdstats; static combrd_t stli_brdstats;
static asystats_t stli_cdkstats; static struct asystats stli_cdkstats;
static stlibrd_t stli_dummybrd; static struct stlibrd stli_dummybrd;
static stliport_t stli_dummyport; static struct stliport stli_dummyport;
/*****************************************************************************/ /*****************************************************************************/
static stlibrd_t *stli_brds[STL_MAXBRDS]; static struct stlibrd *stli_brds[STL_MAXBRDS];
static int stli_shared; static int stli_shared;
...@@ -284,12 +284,10 @@ static char **stli_brdsp[] = { ...@@ -284,12 +284,10 @@ static char **stli_brdsp[] = {
* parse any module arguments. * parse any module arguments.
*/ */
typedef struct stlibrdtype { static struct stlibrdtype {
char *name; char *name;
int type; int type;
} stlibrdtype_t; } stli_brdstr[] = {
static stlibrdtype_t stli_brdstr[] = {
{ "stallion", BRD_STALLION }, { "stallion", BRD_STALLION },
{ "1", BRD_STALLION }, { "1", BRD_STALLION },
{ "brumby", BRD_BRUMBY }, { "brumby", BRD_BRUMBY },
...@@ -594,7 +592,7 @@ static struct pci_driver stli_pcidriver; ...@@ -594,7 +592,7 @@ static struct pci_driver stli_pcidriver;
* Prototype all functions in this driver! * Prototype all functions in this driver!
*/ */
static int stli_parsebrd(stlconf_t *confp, char **argp); static int stli_parsebrd(struct stlconf *confp, char **argp);
static int stli_init(void); static int stli_init(void);
static int stli_open(struct tty_struct *tty, struct file *filp); static int stli_open(struct tty_struct *tty, struct file *filp);
static void stli_close(struct tty_struct *tty, struct file *filp); 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,82 +612,82 @@ static void stli_breakctl(struct tty_struct *tty, int state);
static void stli_waituntilsent(struct tty_struct *tty, int timeout); static void stli_waituntilsent(struct tty_struct *tty, int timeout);
static void stli_sendxchar(struct tty_struct *tty, char ch); static void stli_sendxchar(struct tty_struct *tty, char ch);
static void stli_hangup(struct tty_struct *tty); static void stli_hangup(struct tty_struct *tty);
static int stli_portinfo(stlibrd_t *brdp, stliport_t *portp, int portnr, char *pos); static int stli_portinfo(struct stlibrd *brdp, struct stliport *portp, int portnr, char *pos);
static int stli_brdinit(stlibrd_t *brdp); static int stli_brdinit(struct stlibrd *brdp);
static int stli_startbrd(stlibrd_t *brdp); static int stli_startbrd(struct stlibrd *brdp);
static ssize_t stli_memread(struct file *fp, char __user *buf, size_t count, loff_t *offp); static ssize_t stli_memread(struct file *fp, char __user *buf, size_t count, loff_t *offp);
static ssize_t stli_memwrite(struct file *fp, const char __user *buf, size_t count, loff_t *offp); static ssize_t stli_memwrite(struct file *fp, const char __user *buf, size_t count, loff_t *offp);
static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg); static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg);
static void stli_brdpoll(stlibrd_t *brdp, cdkhdr_t __iomem *hdrp); static void stli_brdpoll(struct stlibrd *brdp, cdkhdr_t __iomem *hdrp);
static void stli_poll(unsigned long arg); static void stli_poll(unsigned long arg);
static int stli_hostcmd(stlibrd_t *brdp, stliport_t *portp); static int stli_hostcmd(struct stlibrd *brdp, struct stliport *portp);
static int stli_initopen(stlibrd_t *brdp, stliport_t *portp); static int stli_initopen(struct stlibrd *brdp, struct stliport *portp);
static int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait); static int stli_rawopen(struct stlibrd *brdp, struct stliport *portp, unsigned long arg, int wait);
static int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait); static int stli_rawclose(struct stlibrd *brdp, struct stliport *portp, unsigned long arg, int wait);
static int stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *filp); static int stli_waitcarrier(struct stlibrd *brdp, struct stliport *portp, struct file *filp);
static void stli_dohangup(struct work_struct *); static void stli_dohangup(struct work_struct *);
static int stli_setport(stliport_t *portp); static int stli_setport(struct stliport *portp);
static int stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); static int stli_cmdwait(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback);
static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); static void stli_sendcmd(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback);
static void __stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); static void __stli_sendcmd(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback);
static void stli_dodelaycmd(stliport_t *portp, cdkctrl_t __iomem *cp); static void stli_dodelaycmd(struct stliport *portp, cdkctrl_t __iomem *cp);
static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct ktermios *tiosp); static void stli_mkasyport(struct stliport *portp, asyport_t *pp, struct ktermios *tiosp);
static void stli_mkasysigs(asysigs_t *sp, int dtr, int rts); static void stli_mkasysigs(asysigs_t *sp, int dtr, int rts);
static long stli_mktiocm(unsigned long sigvalue); static long stli_mktiocm(unsigned long sigvalue);
static void stli_read(stlibrd_t *brdp, stliport_t *portp); static void stli_read(struct stlibrd *brdp, struct stliport *portp);
static int stli_getserial(stliport_t *portp, struct serial_struct __user *sp); static int stli_getserial(struct stliport *portp, struct serial_struct __user *sp);
static int stli_setserial(stliport_t *portp, struct serial_struct __user *sp); static int stli_setserial(struct stliport *portp, struct serial_struct __user *sp);
static int stli_getbrdstats(combrd_t __user *bp); static int stli_getbrdstats(combrd_t __user *bp);
static int stli_getportstats(stliport_t *portp, comstats_t __user *cp); static int stli_getportstats(struct stliport *portp, comstats_t __user *cp);
static int stli_portcmdstats(stliport_t *portp); static int stli_portcmdstats(struct stliport *portp);
static int stli_clrportstats(stliport_t *portp, comstats_t __user *cp); static int stli_clrportstats(struct stliport *portp, comstats_t __user *cp);
static int stli_getportstruct(stliport_t __user *arg); static int stli_getportstruct(struct stliport __user *arg);
static int stli_getbrdstruct(stlibrd_t __user *arg); static int stli_getbrdstruct(struct stlibrd __user *arg);
static stlibrd_t *stli_allocbrd(void); static struct stlibrd *stli_allocbrd(void);
static void stli_ecpinit(stlibrd_t *brdp); static void stli_ecpinit(struct stlibrd *brdp);
static void stli_ecpenable(stlibrd_t *brdp); static void stli_ecpenable(struct stlibrd *brdp);
static void stli_ecpdisable(stlibrd_t *brdp); static void stli_ecpdisable(struct stlibrd *brdp);
static void __iomem *stli_ecpgetmemptr(stlibrd_t *brdp, unsigned long offset, int line); static void __iomem *stli_ecpgetmemptr(struct stlibrd *brdp, unsigned long offset, int line);
static void stli_ecpreset(stlibrd_t *brdp); static void stli_ecpreset(struct stlibrd *brdp);
static void stli_ecpintr(stlibrd_t *brdp); static void stli_ecpintr(struct stlibrd *brdp);
static void stli_ecpeiinit(stlibrd_t *brdp); static void stli_ecpeiinit(struct stlibrd *brdp);
static void stli_ecpeienable(stlibrd_t *brdp); static void stli_ecpeienable(struct stlibrd *brdp);
static void stli_ecpeidisable(stlibrd_t *brdp); static void stli_ecpeidisable(struct stlibrd *brdp);
static void __iomem *stli_ecpeigetmemptr(stlibrd_t *brdp, unsigned long offset, int line); static void __iomem *stli_ecpeigetmemptr(struct stlibrd *brdp, unsigned long offset, int line);
static void stli_ecpeireset(stlibrd_t *brdp); static void stli_ecpeireset(struct stlibrd *brdp);
static void stli_ecpmcenable(stlibrd_t *brdp); static void stli_ecpmcenable(struct stlibrd *brdp);
static void stli_ecpmcdisable(stlibrd_t *brdp); static void stli_ecpmcdisable(struct stlibrd *brdp);
static void __iomem *stli_ecpmcgetmemptr(stlibrd_t *brdp, unsigned long offset, int line); static void __iomem *stli_ecpmcgetmemptr(struct stlibrd *brdp, unsigned long offset, int line);
static void stli_ecpmcreset(stlibrd_t *brdp); static void stli_ecpmcreset(struct stlibrd *brdp);
static void stli_ecppciinit(stlibrd_t *brdp); static void stli_ecppciinit(struct stlibrd *brdp);
static void __iomem *stli_ecppcigetmemptr(stlibrd_t *brdp, unsigned long offset, int line); static void __iomem *stli_ecppcigetmemptr(struct stlibrd *brdp, unsigned long offset, int line);
static void stli_ecppcireset(stlibrd_t *brdp); static void stli_ecppcireset(struct stlibrd *brdp);
static void stli_onbinit(stlibrd_t *brdp); static void stli_onbinit(struct stlibrd *brdp);
static void stli_onbenable(stlibrd_t *brdp); static void stli_onbenable(struct stlibrd *brdp);
static void stli_onbdisable(stlibrd_t *brdp); static void stli_onbdisable(struct stlibrd *brdp);
static void __iomem *stli_onbgetmemptr(stlibrd_t *brdp, unsigned long offset, int line); static void __iomem *stli_onbgetmemptr(struct stlibrd *brdp, unsigned long offset, int line);
static void stli_onbreset(stlibrd_t *brdp); static void stli_onbreset(struct stlibrd *brdp);
static void stli_onbeinit(stlibrd_t *brdp); static void stli_onbeinit(struct stlibrd *brdp);
static void stli_onbeenable(stlibrd_t *brdp); static void stli_onbeenable(struct stlibrd *brdp);
static void stli_onbedisable(stlibrd_t *brdp); static void stli_onbedisable(struct stlibrd *brdp);
static void __iomem *stli_onbegetmemptr(stlibrd_t *brdp, unsigned long offset, int line); static void __iomem *stli_onbegetmemptr(struct stlibrd *brdp, unsigned long offset, int line);
static void stli_onbereset(stlibrd_t *brdp); static void stli_onbereset(struct stlibrd *brdp);
static void stli_bbyinit(stlibrd_t *brdp); static void stli_bbyinit(struct stlibrd *brdp);
static void __iomem *stli_bbygetmemptr(stlibrd_t *brdp, unsigned long offset, int line); static void __iomem *stli_bbygetmemptr(struct stlibrd *brdp, unsigned long offset, int line);
static void stli_bbyreset(stlibrd_t *brdp); static void stli_bbyreset(struct stlibrd *brdp);
static void stli_stalinit(stlibrd_t *brdp); static void stli_stalinit(struct stlibrd *brdp);
static void __iomem *stli_stalgetmemptr(stlibrd_t *brdp, unsigned long offset, int line); static void __iomem *stli_stalgetmemptr(struct stlibrd *brdp, unsigned long offset, int line);
static void stli_stalreset(stlibrd_t *brdp); static void stli_stalreset(struct stlibrd *brdp);
static stliport_t *stli_getport(int brdnr, int panelnr, int portnr); static struct stliport *stli_getport(int brdnr, int panelnr, int portnr);
static int stli_initecp(stlibrd_t *brdp); static int stli_initecp(struct stlibrd *brdp);
static int stli_initonb(stlibrd_t *brdp); static int stli_initonb(struct stlibrd *brdp);
static int stli_eisamemprobe(stlibrd_t *brdp); static int stli_eisamemprobe(struct stlibrd *brdp);
static int stli_initports(stlibrd_t *brdp); static int stli_initports(struct stlibrd *brdp);
/*****************************************************************************/ /*****************************************************************************/
...@@ -727,9 +725,9 @@ static int stli_timeron; ...@@ -727,9 +725,9 @@ static int stli_timeron;
static struct class *istallion_class; static struct class *istallion_class;
static void stli_cleanup_ports(stlibrd_t *brdp) static void stli_cleanup_ports(struct stlibrd *brdp)
{ {
stliport_t *portp; struct stliport *portp;
unsigned int j; unsigned int j;
for (j = 0; j < STL_MAXPORTS; j++) { for (j = 0; j < STL_MAXPORTS; j++) {
...@@ -756,7 +754,7 @@ static int __init istallion_module_init(void) ...@@ -756,7 +754,7 @@ static int __init istallion_module_init(void)
static void __exit istallion_module_exit(void) static void __exit istallion_module_exit(void)
{ {
stlibrd_t *brdp; struct stlibrd *brdp;
int i; int i;
printk(KERN_INFO "Unloading %s: version %s\n", stli_drvtitle, printk(KERN_INFO "Unloading %s: version %s\n", stli_drvtitle,
...@@ -811,7 +809,7 @@ module_exit(istallion_module_exit); ...@@ -811,7 +809,7 @@ module_exit(istallion_module_exit);
* Parse the supplied argument string, into the board conf struct. * Parse the supplied argument string, into the board conf struct.
*/ */
static int stli_parsebrd(stlconf_t *confp, char **argp) static int stli_parsebrd(struct stlconf *confp, char **argp)
{ {
char *sp; char *sp;
int i; int i;
...@@ -843,8 +841,8 @@ static int stli_parsebrd(stlconf_t *confp, char **argp) ...@@ -843,8 +841,8 @@ static int stli_parsebrd(stlconf_t *confp, char **argp)
static int stli_open(struct tty_struct *tty, struct file *filp) static int stli_open(struct tty_struct *tty, struct file *filp)
{ {
stlibrd_t *brdp; struct stlibrd *brdp;
stliport_t *portp; struct stliport *portp;
unsigned int minordev; unsigned int minordev;
int brdnr, portnr, rc; int brdnr, portnr, rc;
...@@ -938,8 +936,8 @@ static int stli_open(struct tty_struct *tty, struct file *filp) ...@@ -938,8 +936,8 @@ static int stli_open(struct tty_struct *tty, struct file *filp)
static void stli_close(struct tty_struct *tty, struct file *filp) static void stli_close(struct tty_struct *tty, struct file *filp)
{ {
stlibrd_t *brdp; struct stlibrd *brdp;
stliport_t *portp; struct stliport *portp;
unsigned long flags; unsigned long flags;
portp = tty->driver_data; portp = tty->driver_data;
...@@ -1016,7 +1014,7 @@ static void stli_close(struct tty_struct *tty, struct file *filp) ...@@ -1016,7 +1014,7 @@ static void stli_close(struct tty_struct *tty, struct file *filp)
* this still all happens pretty quickly. * this still all happens pretty quickly.
*/ */
static int stli_initopen(stlibrd_t *brdp, stliport_t *portp) static int stli_initopen(struct stlibrd *brdp, struct stliport *portp)
{ {
struct tty_struct *tty; struct tty_struct *tty;
asynotify_t nt; asynotify_t nt;
...@@ -1064,7 +1062,7 @@ static int stli_initopen(stlibrd_t *brdp, stliport_t *portp) ...@@ -1064,7 +1062,7 @@ static int stli_initopen(stlibrd_t *brdp, stliport_t *portp)
* to overlap. * to overlap.
*/ */
static int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait) static int stli_rawopen(struct stlibrd *brdp, struct stliport *portp, unsigned long arg, int wait)
{ {
cdkhdr_t __iomem *hdrp; cdkhdr_t __iomem *hdrp;
cdkctrl_t __iomem *cp; cdkctrl_t __iomem *cp;
...@@ -1135,7 +1133,7 @@ static int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, i ...@@ -1135,7 +1133,7 @@ static int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, i
* wait is true then must have user context (to sleep). * wait is true then must have user context (to sleep).
*/ */
static int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait) static int stli_rawclose(struct stlibrd *brdp, struct stliport *portp, unsigned long arg, int wait)
{ {
cdkhdr_t __iomem *hdrp; cdkhdr_t __iomem *hdrp;
cdkctrl_t __iomem *cp; cdkctrl_t __iomem *cp;
...@@ -1199,7 +1197,7 @@ static int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, ...@@ -1199,7 +1197,7 @@ static int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg,
* to complete (as opposed to initiating the command then returning). * to complete (as opposed to initiating the command then returning).
*/ */
static int stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback) static int stli_cmdwait(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback)
{ {
wait_event_interruptible(portp->raw_wait, wait_event_interruptible(portp->raw_wait,
!test_bit(ST_CMDING, &portp->state)); !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,9 +1223,9 @@ static int stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, v
* waiting for the command to complete - so must have user context. * waiting for the command to complete - so must have user context.
*/ */
static int stli_setport(stliport_t *portp) static int stli_setport(struct stliport *portp)
{ {
stlibrd_t *brdp; struct stlibrd *brdp;
asyport_t aport; asyport_t aport;
if (portp == NULL) if (portp == NULL)
...@@ -1251,7 +1249,7 @@ static int stli_setport(stliport_t *portp) ...@@ -1251,7 +1249,7 @@ static int stli_setport(stliport_t *portp)
* maybe because if we are clocal then we don't need to wait... * maybe because if we are clocal then we don't need to wait...
*/ */
static int stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *filp) static int stli_waitcarrier(struct stlibrd *brdp, struct stliport *portp, struct file *filp)
{ {
unsigned long flags; unsigned long flags;
int rc, doclocal; int rc, doclocal;
...@@ -1316,8 +1314,8 @@ static int stli_write(struct tty_struct *tty, const unsigned char *buf, int coun ...@@ -1316,8 +1314,8 @@ static int stli_write(struct tty_struct *tty, const unsigned char *buf, int coun
unsigned char __iomem *bits; unsigned char __iomem *bits;
unsigned char __iomem *shbuf; unsigned char __iomem *shbuf;
unsigned char *chbuf; unsigned char *chbuf;
stliport_t *portp; struct stliport *portp;
stlibrd_t *brdp; struct stlibrd *brdp;
unsigned int len, stlen, head, tail, size; unsigned int len, stlen, head, tail, size;
unsigned long flags; unsigned long flags;
...@@ -1423,8 +1421,8 @@ static void stli_flushchars(struct tty_struct *tty) ...@@ -1423,8 +1421,8 @@ static void stli_flushchars(struct tty_struct *tty)
unsigned char __iomem *bits; unsigned char __iomem *bits;
cdkasy_t __iomem *ap; cdkasy_t __iomem *ap;
struct tty_struct *cooktty; struct tty_struct *cooktty;
stliport_t *portp; struct stliport *portp;
stlibrd_t *brdp; struct stlibrd *brdp;
unsigned int len, stlen, head, tail, size, count, cooksize; unsigned int len, stlen, head, tail, size, count, cooksize;
unsigned char *buf; unsigned char *buf;
unsigned char __iomem *shbuf; unsigned char __iomem *shbuf;
...@@ -1511,8 +1509,8 @@ static void stli_flushchars(struct tty_struct *tty) ...@@ -1511,8 +1509,8 @@ static void stli_flushchars(struct tty_struct *tty)
static int stli_writeroom(struct tty_struct *tty) static int stli_writeroom(struct tty_struct *tty)
{ {
cdkasyrq_t __iomem *rp; cdkasyrq_t __iomem *rp;
stliport_t *portp; struct stliport *portp;
stlibrd_t *brdp; struct stlibrd *brdp;
unsigned int head, tail, len; unsigned int head, tail, len;
unsigned long flags; unsigned long flags;
...@@ -1564,8 +1562,8 @@ static int stli_writeroom(struct tty_struct *tty) ...@@ -1564,8 +1562,8 @@ static int stli_writeroom(struct tty_struct *tty)
static int stli_charsinbuffer(struct tty_struct *tty) static int stli_charsinbuffer(struct tty_struct *tty)
{ {
cdkasyrq_t __iomem *rp; cdkasyrq_t __iomem *rp;
stliport_t *portp; struct stliport *portp;
stlibrd_t *brdp; struct stlibrd *brdp;
unsigned int head, tail, len; unsigned int head, tail, len;
unsigned long flags; unsigned long flags;
...@@ -1602,10 +1600,10 @@ static int stli_charsinbuffer(struct tty_struct *tty) ...@@ -1602,10 +1600,10 @@ static int stli_charsinbuffer(struct tty_struct *tty)
* Generate the serial struct info. * Generate the serial struct info.
*/ */
static int stli_getserial(stliport_t *portp, struct serial_struct __user *sp) static int stli_getserial(struct stliport *portp, struct serial_struct __user *sp)
{ {
struct serial_struct sio; struct serial_struct sio;
stlibrd_t *brdp; struct stlibrd *brdp;
memset(&sio, 0, sizeof(struct serial_struct)); memset(&sio, 0, sizeof(struct serial_struct));
sio.type = PORT_UNKNOWN; sio.type = PORT_UNKNOWN;
...@@ -1635,7 +1633,7 @@ static int stli_getserial(stliport_t *portp, struct serial_struct __user *sp) ...@@ -1635,7 +1633,7 @@ static int stli_getserial(stliport_t *portp, struct serial_struct __user *sp)
* just quietly ignore any requests to change irq, etc. * just quietly ignore any requests to change irq, etc.
*/ */
static int stli_setserial(stliport_t *portp, struct serial_struct __user *sp) static int stli_setserial(struct stliport *portp, struct serial_struct __user *sp)
{ {
struct serial_struct sio; struct serial_struct sio;
int rc; int rc;
...@@ -1666,8 +1664,8 @@ static int stli_setserial(stliport_t *portp, struct serial_struct __user *sp) ...@@ -1666,8 +1664,8 @@ static int stli_setserial(stliport_t *portp, struct serial_struct __user *sp)
static int stli_tiocmget(struct tty_struct *tty, struct file *file) static int stli_tiocmget(struct tty_struct *tty, struct file *file)
{ {
stliport_t *portp = tty->driver_data; struct stliport *portp = tty->driver_data;
stlibrd_t *brdp; struct stlibrd *brdp;
int rc; int rc;
if (portp == NULL) if (portp == NULL)
...@@ -1690,8 +1688,8 @@ static int stli_tiocmget(struct tty_struct *tty, struct file *file) ...@@ -1690,8 +1688,8 @@ static int stli_tiocmget(struct tty_struct *tty, struct file *file)
static int stli_tiocmset(struct tty_struct *tty, struct file *file, static int stli_tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear) unsigned int set, unsigned int clear)
{ {
stliport_t *portp = tty->driver_data; struct stliport *portp = tty->driver_data;
stlibrd_t *brdp; struct stlibrd *brdp;
int rts = -1, dtr = -1; int rts = -1, dtr = -1;
if (portp == NULL) if (portp == NULL)
...@@ -1721,8 +1719,8 @@ static int stli_tiocmset(struct tty_struct *tty, struct file *file, ...@@ -1721,8 +1719,8 @@ static int stli_tiocmset(struct tty_struct *tty, struct file *file,
static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg)
{ {
stliport_t *portp; struct stliport *portp;
stlibrd_t *brdp; struct stlibrd *brdp;
unsigned int ival; unsigned int ival;
int rc; int rc;
void __user *argp = (void __user *)arg; 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,8 +1796,8 @@ static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cm
static void stli_settermios(struct tty_struct *tty, struct ktermios *old) static void stli_settermios(struct tty_struct *tty, struct ktermios *old)
{ {
stliport_t *portp; struct stliport *portp;
stlibrd_t *brdp; struct stlibrd *brdp;
struct ktermios *tiosp; struct ktermios *tiosp;
asyport_t aport; asyport_t aport;
...@@ -1844,7 +1842,7 @@ static void stli_settermios(struct tty_struct *tty, struct ktermios *old) ...@@ -1844,7 +1842,7 @@ static void stli_settermios(struct tty_struct *tty, struct ktermios *old)
static void stli_throttle(struct tty_struct *tty) static void stli_throttle(struct tty_struct *tty)
{ {
stliport_t *portp = tty->driver_data; struct stliport *portp = tty->driver_data;
if (portp == NULL) if (portp == NULL)
return; return;
set_bit(ST_RXSTOP, &portp->state); set_bit(ST_RXSTOP, &portp->state);
...@@ -1860,7 +1858,7 @@ static void stli_throttle(struct tty_struct *tty) ...@@ -1860,7 +1858,7 @@ static void stli_throttle(struct tty_struct *tty)
static void stli_unthrottle(struct tty_struct *tty) static void stli_unthrottle(struct tty_struct *tty)
{ {
stliport_t *portp = tty->driver_data; struct stliport *portp = tty->driver_data;
if (portp == NULL) if (portp == NULL)
return; return;
clear_bit(ST_RXSTOP, &portp->state); clear_bit(ST_RXSTOP, &portp->state);
...@@ -1899,7 +1897,7 @@ static void stli_start(struct tty_struct *tty) ...@@ -1899,7 +1897,7 @@ static void stli_start(struct tty_struct *tty)
static void stli_dohangup(struct work_struct *ugly_api) static void stli_dohangup(struct work_struct *ugly_api)
{ {
stliport_t *portp = container_of(ugly_api, stliport_t, tqhangup); struct stliport *portp = container_of(ugly_api, struct stliport, tqhangup);
if (portp->tty != NULL) { if (portp->tty != NULL) {
tty_hangup(portp->tty); tty_hangup(portp->tty);
} }
...@@ -1916,8 +1914,8 @@ static void stli_dohangup(struct work_struct *ugly_api) ...@@ -1916,8 +1914,8 @@ static void stli_dohangup(struct work_struct *ugly_api)
static void stli_hangup(struct tty_struct *tty) static void stli_hangup(struct tty_struct *tty)
{ {
stliport_t *portp; struct stliport *portp;
stlibrd_t *brdp; struct stlibrd *brdp;
unsigned long flags; unsigned long flags;
portp = tty->driver_data; portp = tty->driver_data;
...@@ -1969,8 +1967,8 @@ static void stli_hangup(struct tty_struct *tty) ...@@ -1969,8 +1967,8 @@ static void stli_hangup(struct tty_struct *tty)
static void stli_flushbuffer(struct tty_struct *tty) static void stli_flushbuffer(struct tty_struct *tty)
{ {
stliport_t *portp; struct stliport *portp;
stlibrd_t *brdp; struct stlibrd *brdp;
unsigned long ftype, flags; unsigned long ftype, flags;
portp = tty->driver_data; portp = tty->driver_data;
...@@ -2006,8 +2004,8 @@ static void stli_flushbuffer(struct tty_struct *tty) ...@@ -2006,8 +2004,8 @@ static void stli_flushbuffer(struct tty_struct *tty)
static void stli_breakctl(struct tty_struct *tty, int state) static void stli_breakctl(struct tty_struct *tty, int state)
{ {
stlibrd_t *brdp; struct stlibrd *brdp;
stliport_t *portp; struct stliport *portp;
long arg; long arg;
portp = tty->driver_data; portp = tty->driver_data;
...@@ -2027,7 +2025,7 @@ static void stli_breakctl(struct tty_struct *tty, int state) ...@@ -2027,7 +2025,7 @@ static void stli_breakctl(struct tty_struct *tty, int state)
static void stli_waituntilsent(struct tty_struct *tty, int timeout) static void stli_waituntilsent(struct tty_struct *tty, int timeout)
{ {
stliport_t *portp; struct stliport *portp;
unsigned long tend; unsigned long tend;
if (tty == NULL) if (tty == NULL)
...@@ -2053,8 +2051,8 @@ static void stli_waituntilsent(struct tty_struct *tty, int timeout) ...@@ -2053,8 +2051,8 @@ static void stli_waituntilsent(struct tty_struct *tty, int timeout)
static void stli_sendxchar(struct tty_struct *tty, char ch) static void stli_sendxchar(struct tty_struct *tty, char ch)
{ {
stlibrd_t *brdp; struct stlibrd *brdp;
stliport_t *portp; struct stliport *portp;
asyctrl_t actrl; asyctrl_t actrl;
portp = tty->driver_data; portp = tty->driver_data;
...@@ -2088,7 +2086,7 @@ static void stli_sendxchar(struct tty_struct *tty, char ch) ...@@ -2088,7 +2086,7 @@ static void stli_sendxchar(struct tty_struct *tty, char ch)
* short then padded with spaces). * short then padded with spaces).
*/ */
static int stli_portinfo(stlibrd_t *brdp, stliport_t *portp, int portnr, char *pos) static int stli_portinfo(struct stlibrd *brdp, struct stliport *portp, int portnr, char *pos)
{ {
char *sp, *uart; char *sp, *uart;
int rc, cnt; int rc, cnt;
...@@ -2151,8 +2149,8 @@ static int stli_portinfo(stlibrd_t *brdp, stliport_t *portp, int portnr, char *p ...@@ -2151,8 +2149,8 @@ static int stli_portinfo(stlibrd_t *brdp, stliport_t *portp, int portnr, char *p
static int stli_readproc(char *page, char **start, off_t off, int count, int *eof, void *data) static int stli_readproc(char *page, char **start, off_t off, int count, int *eof, void *data)
{ {
stlibrd_t *brdp; struct stlibrd *brdp;
stliport_t *portp; struct stliport *portp;
int brdnr, portnr, totalport; int brdnr, portnr, totalport;
int curoff, maxoff; int curoff, maxoff;
char *pos; char *pos;
...@@ -2223,7 +2221,7 @@ static int stli_readproc(char *page, char **start, off_t off, int count, int *eo ...@@ -2223,7 +2221,7 @@ static int stli_readproc(char *page, char **start, off_t off, int count, int *eo
* entry point) * entry point)
*/ */
static void __stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback) static void __stli_sendcmd(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback)
{ {
cdkhdr_t __iomem *hdrp; cdkhdr_t __iomem *hdrp;
cdkctrl_t __iomem *cp; cdkctrl_t __iomem *cp;
...@@ -2259,7 +2257,7 @@ static void __stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd ...@@ -2259,7 +2257,7 @@ static void __stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd
spin_unlock_irqrestore(&brd_lock, flags); spin_unlock_irqrestore(&brd_lock, flags);
} }
static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback) static void stli_sendcmd(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback)
{ {
unsigned long flags; unsigned long flags;
...@@ -2278,7 +2276,7 @@ static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, ...@@ -2278,7 +2276,7 @@ static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd,
* more chars to unload. * more chars to unload.
*/ */
static void stli_read(stlibrd_t *brdp, stliport_t *portp) static void stli_read(struct stlibrd *brdp, struct stliport *portp)
{ {
cdkasyrq_t __iomem *rp; cdkasyrq_t __iomem *rp;
char __iomem *shbuf; char __iomem *shbuf;
...@@ -2340,7 +2338,7 @@ static void stli_read(stlibrd_t *brdp, stliport_t *portp) ...@@ -2340,7 +2338,7 @@ static void stli_read(stlibrd_t *brdp, stliport_t *portp)
* difficult to deal with them here. * difficult to deal with them here.
*/ */
static void stli_dodelaycmd(stliport_t *portp, cdkctrl_t __iomem *cp) static void stli_dodelaycmd(struct stliport *portp, cdkctrl_t __iomem *cp)
{ {
int cmd; int cmd;
...@@ -2388,7 +2386,7 @@ static void stli_dodelaycmd(stliport_t *portp, cdkctrl_t __iomem *cp) ...@@ -2388,7 +2386,7 @@ static void stli_dodelaycmd(stliport_t *portp, cdkctrl_t __iomem *cp)
* then port is still busy, otherwise no longer busy. * then port is still busy, otherwise no longer busy.
*/ */
static int stli_hostcmd(stlibrd_t *brdp, stliport_t *portp) static int stli_hostcmd(struct stlibrd *brdp, struct stliport *portp)
{ {
cdkasy_t __iomem *ap; cdkasy_t __iomem *ap;
cdkctrl_t __iomem *cp; cdkctrl_t __iomem *cp;
...@@ -2535,9 +2533,9 @@ static int stli_hostcmd(stlibrd_t *brdp, stliport_t *portp) ...@@ -2535,9 +2533,9 @@ static int stli_hostcmd(stlibrd_t *brdp, stliport_t *portp)
* at the cdk header structure. * at the cdk header structure.
*/ */
static void stli_brdpoll(stlibrd_t *brdp, cdkhdr_t __iomem *hdrp) static void stli_brdpoll(struct stlibrd *brdp, cdkhdr_t __iomem *hdrp)
{ {
stliport_t *portp; struct stliport *portp;
unsigned char hostbits[(STL_MAXCHANS / 8) + 1]; unsigned char hostbits[(STL_MAXCHANS / 8) + 1];
unsigned char slavebits[(STL_MAXCHANS / 8) + 1]; unsigned char slavebits[(STL_MAXCHANS / 8) + 1];
unsigned char __iomem *slavep; unsigned char __iomem *slavep;
...@@ -2604,7 +2602,7 @@ static void stli_brdpoll(stlibrd_t *brdp, cdkhdr_t __iomem *hdrp) ...@@ -2604,7 +2602,7 @@ static void stli_brdpoll(stlibrd_t *brdp, cdkhdr_t __iomem *hdrp)
static void stli_poll(unsigned long arg) static void stli_poll(unsigned long arg)
{ {
cdkhdr_t __iomem *hdrp; cdkhdr_t __iomem *hdrp;
stlibrd_t *brdp; struct stlibrd *brdp;
int brdnr; int brdnr;
stli_timerlist.expires = STLI_TIMEOUT; stli_timerlist.expires = STLI_TIMEOUT;
...@@ -2637,7 +2635,7 @@ static void stli_poll(unsigned long arg) ...@@ -2637,7 +2635,7 @@ static void stli_poll(unsigned long arg)
* the slave. * the slave.
*/ */
static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct ktermios *tiosp) static void stli_mkasyport(struct stliport *portp, asyport_t *pp, struct ktermios *tiosp)
{ {
memset(pp, 0, sizeof(asyport_t)); memset(pp, 0, sizeof(asyport_t));
...@@ -2786,13 +2784,13 @@ static long stli_mktiocm(unsigned long sigvalue) ...@@ -2786,13 +2784,13 @@ static long stli_mktiocm(unsigned long sigvalue)
* we need to do here is set up the appropriate per port data structures. * we need to do here is set up the appropriate per port data structures.
*/ */
static int stli_initports(stlibrd_t *brdp) static int stli_initports(struct stlibrd *brdp)
{ {
stliport_t *portp; struct stliport *portp;
int i, panelnr, panelport; int i, panelnr, panelport;
for (i = 0, panelnr = 0, panelport = 0; (i < brdp->nrports); i++) { for (i = 0, panelnr = 0, panelport = 0; (i < brdp->nrports); i++) {
portp = kzalloc(sizeof(stliport_t), GFP_KERNEL); portp = kzalloc(sizeof(struct stliport), GFP_KERNEL);
if (!portp) { if (!portp) {
printk("STALLION: failed to allocate port structure\n"); printk("STALLION: failed to allocate port structure\n");
continue; continue;
...@@ -2826,7 +2824,7 @@ static int stli_initports(stlibrd_t *brdp) ...@@ -2826,7 +2824,7 @@ static int stli_initports(stlibrd_t *brdp)
* All the following routines are board specific hardware operations. * All the following routines are board specific hardware operations.
*/ */
static void stli_ecpinit(stlibrd_t *brdp) static void stli_ecpinit(struct stlibrd *brdp)
{ {
unsigned long memconf; unsigned long memconf;
...@@ -2841,21 +2839,21 @@ static void stli_ecpinit(stlibrd_t *brdp) ...@@ -2841,21 +2839,21 @@ static void stli_ecpinit(stlibrd_t *brdp)
/*****************************************************************************/ /*****************************************************************************/
static void stli_ecpenable(stlibrd_t *brdp) static void stli_ecpenable(struct stlibrd *brdp)
{ {
outb(ECP_ATENABLE, (brdp->iobase + ECP_ATCONFR)); outb(ECP_ATENABLE, (brdp->iobase + ECP_ATCONFR));
} }
/*****************************************************************************/ /*****************************************************************************/
static void stli_ecpdisable(stlibrd_t *brdp) static void stli_ecpdisable(struct stlibrd *brdp)
{ {
outb(ECP_ATDISABLE, (brdp->iobase + ECP_ATCONFR)); outb(ECP_ATDISABLE, (brdp->iobase + ECP_ATCONFR));
} }
/*****************************************************************************/ /*****************************************************************************/
static void __iomem *stli_ecpgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) static void __iomem *stli_ecpgetmemptr(struct stlibrd *brdp, unsigned long offset, int line)
{ {
void __iomem *ptr; void __iomem *ptr;
unsigned char val; unsigned char val;
...@@ -2876,7 +2874,7 @@ static void __iomem *stli_ecpgetmemptr(stlibrd_t *brdp, unsigned long offset, in ...@@ -2876,7 +2874,7 @@ static void __iomem *stli_ecpgetmemptr(stlibrd_t *brdp, unsigned long offset, in
/*****************************************************************************/ /*****************************************************************************/
static void stli_ecpreset(stlibrd_t *brdp) static void stli_ecpreset(struct stlibrd *brdp)
{ {
outb(ECP_ATSTOP, (brdp->iobase + ECP_ATCONFR)); outb(ECP_ATSTOP, (brdp->iobase + ECP_ATCONFR));
udelay(10); udelay(10);
...@@ -2886,7 +2884,7 @@ static void stli_ecpreset(stlibrd_t *brdp) ...@@ -2886,7 +2884,7 @@ static void stli_ecpreset(stlibrd_t *brdp)
/*****************************************************************************/ /*****************************************************************************/
static void stli_ecpintr(stlibrd_t *brdp) static void stli_ecpintr(struct stlibrd *brdp)
{ {
outb(0x1, brdp->iobase); outb(0x1, brdp->iobase);
} }
...@@ -2897,7 +2895,7 @@ static void stli_ecpintr(stlibrd_t *brdp) ...@@ -2897,7 +2895,7 @@ static void stli_ecpintr(stlibrd_t *brdp)
* The following set of functions act on ECP EISA boards. * The following set of functions act on ECP EISA boards.
*/ */
static void stli_ecpeiinit(stlibrd_t *brdp) static void stli_ecpeiinit(struct stlibrd *brdp)
{ {
unsigned long memconf; unsigned long memconf;
...@@ -2915,21 +2913,21 @@ static void stli_ecpeiinit(stlibrd_t *brdp) ...@@ -2915,21 +2913,21 @@ static void stli_ecpeiinit(stlibrd_t *brdp)
/*****************************************************************************/ /*****************************************************************************/
static void stli_ecpeienable(stlibrd_t *brdp) static void stli_ecpeienable(struct stlibrd *brdp)
{ {
outb(ECP_EIENABLE, (brdp->iobase + ECP_EICONFR)); outb(ECP_EIENABLE, (brdp->iobase + ECP_EICONFR));
} }
/*****************************************************************************/ /*****************************************************************************/
static void stli_ecpeidisable(stlibrd_t *brdp) static void stli_ecpeidisable(struct stlibrd *brdp)
{ {
outb(ECP_EIDISABLE, (brdp->iobase + ECP_EICONFR)); outb(ECP_EIDISABLE, (brdp->iobase + ECP_EICONFR));
} }
/*****************************************************************************/ /*****************************************************************************/
static void __iomem *stli_ecpeigetmemptr(stlibrd_t *brdp, unsigned long offset, int line) static void __iomem *stli_ecpeigetmemptr(struct stlibrd *brdp, unsigned long offset, int line)
{ {
void __iomem *ptr; void __iomem *ptr;
unsigned char val; unsigned char val;
...@@ -2953,7 +2951,7 @@ static void __iomem *stli_ecpeigetmemptr(stlibrd_t *brdp, unsigned long offset, ...@@ -2953,7 +2951,7 @@ static void __iomem *stli_ecpeigetmemptr(stlibrd_t *brdp, unsigned long offset,
/*****************************************************************************/ /*****************************************************************************/
static void stli_ecpeireset(stlibrd_t *brdp) static void stli_ecpeireset(struct stlibrd *brdp)
{ {
outb(ECP_EISTOP, (brdp->iobase + ECP_EICONFR)); outb(ECP_EISTOP, (brdp->iobase + ECP_EICONFR));
udelay(10); udelay(10);
...@@ -2967,21 +2965,21 @@ static void stli_ecpeireset(stlibrd_t *brdp) ...@@ -2967,21 +2965,21 @@ static void stli_ecpeireset(stlibrd_t *brdp)
* The following set of functions act on ECP MCA boards. * The following set of functions act on ECP MCA boards.
*/ */
static void stli_ecpmcenable(stlibrd_t *brdp) static void stli_ecpmcenable(struct stlibrd *brdp)
{ {
outb(ECP_MCENABLE, (brdp->iobase + ECP_MCCONFR)); outb(ECP_MCENABLE, (brdp->iobase + ECP_MCCONFR));
} }
/*****************************************************************************/ /*****************************************************************************/
static void stli_ecpmcdisable(stlibrd_t *brdp) static void stli_ecpmcdisable(struct stlibrd *brdp)
{ {
outb(ECP_MCDISABLE, (brdp->iobase + ECP_MCCONFR)); outb(ECP_MCDISABLE, (brdp->iobase + ECP_MCCONFR));
} }
/*****************************************************************************/ /*****************************************************************************/
static void __iomem *stli_ecpmcgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) static void __iomem *stli_ecpmcgetmemptr(struct stlibrd *brdp, unsigned long offset, int line)
{ {
void __iomem *ptr; void __iomem *ptr;
unsigned char val; unsigned char val;
...@@ -3002,7 +3000,7 @@ static void __iomem *stli_ecpmcgetmemptr(stlibrd_t *brdp, unsigned long offset, ...@@ -3002,7 +3000,7 @@ static void __iomem *stli_ecpmcgetmemptr(stlibrd_t *brdp, unsigned long offset,
/*****************************************************************************/ /*****************************************************************************/
static void stli_ecpmcreset(stlibrd_t *brdp) static void stli_ecpmcreset(struct stlibrd *brdp)
{ {
outb(ECP_MCSTOP, (brdp->iobase + ECP_MCCONFR)); outb(ECP_MCSTOP, (brdp->iobase + ECP_MCCONFR));
udelay(10); udelay(10);
...@@ -3016,7 +3014,7 @@ static void stli_ecpmcreset(stlibrd_t *brdp) ...@@ -3016,7 +3014,7 @@ static void stli_ecpmcreset(stlibrd_t *brdp)
* The following set of functions act on ECP PCI boards. * The following set of functions act on ECP PCI boards.
*/ */
static void stli_ecppciinit(stlibrd_t *brdp) static void stli_ecppciinit(struct stlibrd *brdp)
{ {
outb(ECP_PCISTOP, (brdp->iobase + ECP_PCICONFR)); outb(ECP_PCISTOP, (brdp->iobase + ECP_PCICONFR));
udelay(10); udelay(10);
...@@ -3026,7 +3024,7 @@ static void stli_ecppciinit(stlibrd_t *brdp) ...@@ -3026,7 +3024,7 @@ static void stli_ecppciinit(stlibrd_t *brdp)
/*****************************************************************************/ /*****************************************************************************/
static void __iomem *stli_ecppcigetmemptr(stlibrd_t *brdp, unsigned long offset, int line) static void __iomem *stli_ecppcigetmemptr(struct stlibrd *brdp, unsigned long offset, int line)
{ {
void __iomem *ptr; void __iomem *ptr;
unsigned char val; unsigned char val;
...@@ -3047,7 +3045,7 @@ static void __iomem *stli_ecppcigetmemptr(stlibrd_t *brdp, unsigned long offset, ...@@ -3047,7 +3045,7 @@ static void __iomem *stli_ecppcigetmemptr(stlibrd_t *brdp, unsigned long offset,
/*****************************************************************************/ /*****************************************************************************/
static void stli_ecppcireset(stlibrd_t *brdp) static void stli_ecppcireset(struct stlibrd *brdp)
{ {
outb(ECP_PCISTOP, (brdp->iobase + ECP_PCICONFR)); outb(ECP_PCISTOP, (brdp->iobase + ECP_PCICONFR));
udelay(10); udelay(10);
...@@ -3061,7 +3059,7 @@ static void stli_ecppcireset(stlibrd_t *brdp) ...@@ -3061,7 +3059,7 @@ static void stli_ecppcireset(stlibrd_t *brdp)
* The following routines act on ONboards. * The following routines act on ONboards.
*/ */
static void stli_onbinit(stlibrd_t *brdp) static void stli_onbinit(struct stlibrd *brdp)
{ {
unsigned long memconf; unsigned long memconf;
...@@ -3078,21 +3076,21 @@ static void stli_onbinit(stlibrd_t *brdp) ...@@ -3078,21 +3076,21 @@ static void stli_onbinit(stlibrd_t *brdp)
/*****************************************************************************/ /*****************************************************************************/
static void stli_onbenable(stlibrd_t *brdp) static void stli_onbenable(struct stlibrd *brdp)
{ {
outb((brdp->enabval | ONB_ATENABLE), (brdp->iobase + ONB_ATCONFR)); outb((brdp->enabval | ONB_ATENABLE), (brdp->iobase + ONB_ATCONFR));
} }
/*****************************************************************************/ /*****************************************************************************/
static void stli_onbdisable(stlibrd_t *brdp) static void stli_onbdisable(struct stlibrd *brdp)
{ {
outb((brdp->enabval | ONB_ATDISABLE), (brdp->iobase + ONB_ATCONFR)); outb((brdp->enabval | ONB_ATDISABLE), (brdp->iobase + ONB_ATCONFR));
} }
/*****************************************************************************/ /*****************************************************************************/
static void __iomem *stli_onbgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) static void __iomem *stli_onbgetmemptr(struct stlibrd *brdp, unsigned long offset, int line)
{ {
void __iomem *ptr; void __iomem *ptr;
...@@ -3109,7 +3107,7 @@ static void __iomem *stli_onbgetmemptr(stlibrd_t *brdp, unsigned long offset, in ...@@ -3109,7 +3107,7 @@ static void __iomem *stli_onbgetmemptr(stlibrd_t *brdp, unsigned long offset, in
/*****************************************************************************/ /*****************************************************************************/
static void stli_onbreset(stlibrd_t *brdp) static void stli_onbreset(struct stlibrd *brdp)
{ {
outb(ONB_ATSTOP, (brdp->iobase + ONB_ATCONFR)); outb(ONB_ATSTOP, (brdp->iobase + ONB_ATCONFR));
udelay(10); udelay(10);
...@@ -3123,7 +3121,7 @@ static void stli_onbreset(stlibrd_t *brdp) ...@@ -3123,7 +3121,7 @@ static void stli_onbreset(stlibrd_t *brdp)
* The following routines act on ONboard EISA. * The following routines act on ONboard EISA.
*/ */
static void stli_onbeinit(stlibrd_t *brdp) static void stli_onbeinit(struct stlibrd *brdp)
{ {
unsigned long memconf; unsigned long memconf;
...@@ -3143,21 +3141,21 @@ static void stli_onbeinit(stlibrd_t *brdp) ...@@ -3143,21 +3141,21 @@ static void stli_onbeinit(stlibrd_t *brdp)
/*****************************************************************************/ /*****************************************************************************/
static void stli_onbeenable(stlibrd_t *brdp) static void stli_onbeenable(struct stlibrd *brdp)
{ {
outb(ONB_EIENABLE, (brdp->iobase + ONB_EICONFR)); outb(ONB_EIENABLE, (brdp->iobase + ONB_EICONFR));
} }
/*****************************************************************************/ /*****************************************************************************/
static void stli_onbedisable(stlibrd_t *brdp) static void stli_onbedisable(struct stlibrd *brdp)
{ {
outb(ONB_EIDISABLE, (brdp->iobase + ONB_EICONFR)); outb(ONB_EIDISABLE, (brdp->iobase + ONB_EICONFR));
} }
/*****************************************************************************/ /*****************************************************************************/
static void __iomem *stli_onbegetmemptr(stlibrd_t *brdp, unsigned long offset, int line) static void __iomem *stli_onbegetmemptr(struct stlibrd *brdp, unsigned long offset, int line)
{ {
void __iomem *ptr; void __iomem *ptr;
unsigned char val; unsigned char val;
...@@ -3181,7 +3179,7 @@ static void __iomem *stli_onbegetmemptr(stlibrd_t *brdp, unsigned long offset, i ...@@ -3181,7 +3179,7 @@ static void __iomem *stli_onbegetmemptr(stlibrd_t *brdp, unsigned long offset, i
/*****************************************************************************/ /*****************************************************************************/
static void stli_onbereset(stlibrd_t *brdp) static void stli_onbereset(struct stlibrd *brdp)
{ {
outb(ONB_EISTOP, (brdp->iobase + ONB_EICONFR)); outb(ONB_EISTOP, (brdp->iobase + ONB_EICONFR));
udelay(10); udelay(10);
...@@ -3195,7 +3193,7 @@ static void stli_onbereset(stlibrd_t *brdp) ...@@ -3195,7 +3193,7 @@ static void stli_onbereset(stlibrd_t *brdp)
* The following routines act on Brumby boards. * The following routines act on Brumby boards.
*/ */
static void stli_bbyinit(stlibrd_t *brdp) static void stli_bbyinit(struct stlibrd *brdp)
{ {
outb(BBY_ATSTOP, (brdp->iobase + BBY_ATCONFR)); outb(BBY_ATSTOP, (brdp->iobase + BBY_ATCONFR));
udelay(10); udelay(10);
...@@ -3207,7 +3205,7 @@ static void stli_bbyinit(stlibrd_t *brdp) ...@@ -3207,7 +3205,7 @@ static void stli_bbyinit(stlibrd_t *brdp)
/*****************************************************************************/ /*****************************************************************************/
static void __iomem *stli_bbygetmemptr(stlibrd_t *brdp, unsigned long offset, int line) static void __iomem *stli_bbygetmemptr(struct stlibrd *brdp, unsigned long offset, int line)
{ {
void __iomem *ptr; void __iomem *ptr;
unsigned char val; unsigned char val;
...@@ -3222,7 +3220,7 @@ static void __iomem *stli_bbygetmemptr(stlibrd_t *brdp, unsigned long offset, in ...@@ -3222,7 +3220,7 @@ static void __iomem *stli_bbygetmemptr(stlibrd_t *brdp, unsigned long offset, in
/*****************************************************************************/ /*****************************************************************************/
static void stli_bbyreset(stlibrd_t *brdp) static void stli_bbyreset(struct stlibrd *brdp)
{ {
outb(BBY_ATSTOP, (brdp->iobase + BBY_ATCONFR)); outb(BBY_ATSTOP, (brdp->iobase + BBY_ATCONFR));
udelay(10); udelay(10);
...@@ -3236,7 +3234,7 @@ static void stli_bbyreset(stlibrd_t *brdp) ...@@ -3236,7 +3234,7 @@ static void stli_bbyreset(stlibrd_t *brdp)
* The following routines act on original old Stallion boards. * The following routines act on original old Stallion boards.
*/ */
static void stli_stalinit(stlibrd_t *brdp) static void stli_stalinit(struct stlibrd *brdp)
{ {
outb(0x1, brdp->iobase); outb(0x1, brdp->iobase);
mdelay(1000); mdelay(1000);
...@@ -3244,7 +3242,7 @@ static void stli_stalinit(stlibrd_t *brdp) ...@@ -3244,7 +3242,7 @@ static void stli_stalinit(stlibrd_t *brdp)
/*****************************************************************************/ /*****************************************************************************/
static void __iomem *stli_stalgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) static void __iomem *stli_stalgetmemptr(struct stlibrd *brdp, unsigned long offset, int line)
{ {
BUG_ON(offset > brdp->memsize); BUG_ON(offset > brdp->memsize);
return brdp->membase + (offset % STAL_PAGESIZE); return brdp->membase + (offset % STAL_PAGESIZE);
...@@ -3252,7 +3250,7 @@ static void __iomem *stli_stalgetmemptr(stlibrd_t *brdp, unsigned long offset, i ...@@ -3252,7 +3250,7 @@ static void __iomem *stli_stalgetmemptr(stlibrd_t *brdp, unsigned long offset, i
/*****************************************************************************/ /*****************************************************************************/
static void stli_stalreset(stlibrd_t *brdp) static void stli_stalreset(struct stlibrd *brdp)
{ {
u32 __iomem *vecp; u32 __iomem *vecp;
...@@ -3269,7 +3267,7 @@ static void stli_stalreset(stlibrd_t *brdp) ...@@ -3269,7 +3267,7 @@ static void stli_stalreset(stlibrd_t *brdp)
* board types. * board types.
*/ */
static int stli_initecp(stlibrd_t *brdp) static int stli_initecp(struct stlibrd *brdp)
{ {
cdkecpsig_t sig; cdkecpsig_t sig;
cdkecpsig_t __iomem *sigsp; cdkecpsig_t __iomem *sigsp;
...@@ -3415,7 +3413,7 @@ static int stli_initecp(stlibrd_t *brdp) ...@@ -3415,7 +3413,7 @@ static int stli_initecp(stlibrd_t *brdp)
* This handles only these board types. * This handles only these board types.
*/ */
static int stli_initonb(stlibrd_t *brdp) static int stli_initonb(struct stlibrd *brdp)
{ {
cdkonbsig_t sig; cdkonbsig_t sig;
cdkonbsig_t __iomem *sigsp; cdkonbsig_t __iomem *sigsp;
...@@ -3566,13 +3564,13 @@ static int stli_initonb(stlibrd_t *brdp) ...@@ -3566,13 +3564,13 @@ static int stli_initonb(stlibrd_t *brdp)
* read in the memory map, and get the show on the road... * read in the memory map, and get the show on the road...
*/ */
static int stli_startbrd(stlibrd_t *brdp) static int stli_startbrd(struct stlibrd *brdp)
{ {
cdkhdr_t __iomem *hdrp; cdkhdr_t __iomem *hdrp;
cdkmem_t __iomem *memp; cdkmem_t __iomem *memp;
cdkasy_t __iomem *ap; cdkasy_t __iomem *ap;
unsigned long flags; unsigned long flags;
stliport_t *portp; struct stliport *portp;
int portnr, nrdevs, i, rc = 0; int portnr, nrdevs, i, rc = 0;
u32 memoff; u32 memoff;
...@@ -3673,7 +3671,7 @@ static int stli_startbrd(stlibrd_t *brdp) ...@@ -3673,7 +3671,7 @@ static int stli_startbrd(stlibrd_t *brdp)
* Probe and initialize the specified board. * Probe and initialize the specified board.
*/ */
static int __devinit stli_brdinit(stlibrd_t *brdp) static int __devinit stli_brdinit(struct stlibrd *brdp)
{ {
stli_brds[brdp->brdnr] = brdp; stli_brds[brdp->brdnr] = brdp;
...@@ -3720,7 +3718,7 @@ static int __devinit stli_brdinit(stlibrd_t *brdp) ...@@ -3720,7 +3718,7 @@ static int __devinit stli_brdinit(stlibrd_t *brdp)
* might be. This is a bit if hack, but it is the best we can do. * might be. This is a bit if hack, but it is the best we can do.
*/ */
static int stli_eisamemprobe(stlibrd_t *brdp) static int stli_eisamemprobe(struct stlibrd *brdp)
{ {
cdkecpsig_t ecpsig, __iomem *ecpsigp; cdkecpsig_t ecpsig, __iomem *ecpsigp;
cdkonbsig_t onbsig, __iomem *onbsigp; cdkonbsig_t onbsig, __iomem *onbsigp;
...@@ -3835,7 +3833,7 @@ static int stli_getbrdnr(void) ...@@ -3835,7 +3833,7 @@ static int stli_getbrdnr(void)
static int stli_findeisabrds(void) static int stli_findeisabrds(void)
{ {
stlibrd_t *brdp; struct stlibrd *brdp;
unsigned int iobase, eid; unsigned int iobase, eid;
int i; int i;
...@@ -3912,7 +3910,7 @@ static int stli_findeisabrds(void) ...@@ -3912,7 +3910,7 @@ static int stli_findeisabrds(void)
static int __devinit stli_pciprobe(struct pci_dev *pdev, static int __devinit stli_pciprobe(struct pci_dev *pdev,
const struct pci_device_id *ent) const struct pci_device_id *ent)
{ {
stlibrd_t *brdp; struct stlibrd *brdp;
int retval = -EIO; int retval = -EIO;
retval = pci_enable_device(pdev); retval = pci_enable_device(pdev);
...@@ -3951,7 +3949,7 @@ static int __devinit stli_pciprobe(struct pci_dev *pdev, ...@@ -3951,7 +3949,7 @@ static int __devinit stli_pciprobe(struct pci_dev *pdev,
static void stli_pciremove(struct pci_dev *pdev) static void stli_pciremove(struct pci_dev *pdev)
{ {
stlibrd_t *brdp = pci_get_drvdata(pdev); struct stlibrd *brdp = pci_get_drvdata(pdev);
stli_cleanup_ports(brdp); stli_cleanup_ports(brdp);
...@@ -3975,14 +3973,14 @@ static struct pci_driver stli_pcidriver = { ...@@ -3975,14 +3973,14 @@ static struct pci_driver stli_pcidriver = {
* Allocate a new board structure. Fill out the basic info in it. * Allocate a new board structure. Fill out the basic info in it.
*/ */
static stlibrd_t *stli_allocbrd(void) static struct stlibrd *stli_allocbrd(void)
{ {
stlibrd_t *brdp; struct stlibrd *brdp;
brdp = kzalloc(sizeof(stlibrd_t), GFP_KERNEL); brdp = kzalloc(sizeof(struct stlibrd), GFP_KERNEL);
if (!brdp) { if (!brdp) {
printk(KERN_ERR "STALLION: failed to allocate memory " printk(KERN_ERR "STALLION: failed to allocate memory "
"(size=%Zd)\n", sizeof(stlibrd_t)); "(size=%Zd)\n", sizeof(struct stlibrd));
return NULL; return NULL;
} }
brdp->magic = STLI_BOARDMAGIC; brdp->magic = STLI_BOARDMAGIC;
...@@ -3998,8 +3996,8 @@ static stlibrd_t *stli_allocbrd(void) ...@@ -3998,8 +3996,8 @@ static stlibrd_t *stli_allocbrd(void)
static int stli_initbrds(void) static int stli_initbrds(void)
{ {
stlibrd_t *brdp, *nxtbrdp; struct stlibrd *brdp, *nxtbrdp;
stlconf_t conf; struct stlconf conf;
int i, j, retval; int i, j, retval;
for (stli_nrbrds = 0; stli_nrbrds < ARRAY_SIZE(stli_brdsp); 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,7 +4073,7 @@ static ssize_t stli_memread(struct file *fp, char __user *buf, size_t count, lof
{ {
unsigned long flags; unsigned long flags;
void __iomem *memptr; void __iomem *memptr;
stlibrd_t *brdp; struct stlibrd *brdp;
int brdnr, size, n; int brdnr, size, n;
void *p; void *p;
loff_t off = *offp; loff_t off = *offp;
...@@ -4138,7 +4136,7 @@ static ssize_t stli_memwrite(struct file *fp, const char __user *buf, size_t cou ...@@ -4138,7 +4136,7 @@ static ssize_t stli_memwrite(struct file *fp, const char __user *buf, size_t cou
{ {
unsigned long flags; unsigned long flags;
void __iomem *memptr; void __iomem *memptr;
stlibrd_t *brdp; struct stlibrd *brdp;
char __user *chbuf; char __user *chbuf;
int brdnr, size, n; int brdnr, size, n;
void *p; void *p;
...@@ -4199,7 +4197,7 @@ static ssize_t stli_memwrite(struct file *fp, const char __user *buf, size_t cou ...@@ -4199,7 +4197,7 @@ static ssize_t stli_memwrite(struct file *fp, const char __user *buf, size_t cou
static int stli_getbrdstats(combrd_t __user *bp) static int stli_getbrdstats(combrd_t __user *bp)
{ {
stlibrd_t *brdp; struct stlibrd *brdp;
int i; int i;
if (copy_from_user(&stli_brdstats, bp, sizeof(combrd_t))) if (copy_from_user(&stli_brdstats, bp, sizeof(combrd_t)))
...@@ -4236,9 +4234,9 @@ static int stli_getbrdstats(combrd_t __user *bp) ...@@ -4236,9 +4234,9 @@ static int stli_getbrdstats(combrd_t __user *bp)
* Resolve the referenced port number into a port struct pointer. * Resolve the referenced port number into a port struct pointer.
*/ */
static stliport_t *stli_getport(int brdnr, int panelnr, int portnr) static struct stliport *stli_getport(int brdnr, int panelnr, int portnr)
{ {
stlibrd_t *brdp; struct stlibrd *brdp;
int i; int i;
if (brdnr < 0 || brdnr >= STL_MAXBRDS) if (brdnr < 0 || brdnr >= STL_MAXBRDS)
...@@ -4261,10 +4259,10 @@ static stliport_t *stli_getport(int brdnr, int panelnr, int portnr) ...@@ -4261,10 +4259,10 @@ static stliport_t *stli_getport(int brdnr, int panelnr, int portnr)
* what port to get stats for (used through board control device). * what port to get stats for (used through board control device).
*/ */
static int stli_portcmdstats(stliport_t *portp) static int stli_portcmdstats(struct stliport *portp)
{ {
unsigned long flags; unsigned long flags;
stlibrd_t *brdp; struct stlibrd *brdp;
int rc; int rc;
memset(&stli_comstats, 0, sizeof(comstats_t)); memset(&stli_comstats, 0, sizeof(comstats_t));
...@@ -4335,9 +4333,9 @@ static int stli_portcmdstats(stliport_t *portp) ...@@ -4335,9 +4333,9 @@ static int stli_portcmdstats(stliport_t *portp)
* what port to get stats for (used through board control device). * what port to get stats for (used through board control device).
*/ */
static int stli_getportstats(stliport_t *portp, comstats_t __user *cp) static int stli_getportstats(struct stliport *portp, comstats_t __user *cp)
{ {
stlibrd_t *brdp; struct stlibrd *brdp;
int rc; int rc;
if (!portp) { if (!portp) {
...@@ -4366,9 +4364,9 @@ static int stli_getportstats(stliport_t *portp, comstats_t __user *cp) ...@@ -4366,9 +4364,9 @@ static int stli_getportstats(stliport_t *portp, comstats_t __user *cp)
* Clear the port stats structure. We also return it zeroed out... * Clear the port stats structure. We also return it zeroed out...
*/ */
static int stli_clrportstats(stliport_t *portp, comstats_t __user *cp) static int stli_clrportstats(struct stliport *portp, comstats_t __user *cp)
{ {
stlibrd_t *brdp; struct stlibrd *brdp;
int rc; int rc;
if (!portp) { if (!portp) {
...@@ -4405,17 +4403,17 @@ static int stli_clrportstats(stliport_t *portp, comstats_t __user *cp) ...@@ -4405,17 +4403,17 @@ static int stli_clrportstats(stliport_t *portp, comstats_t __user *cp)
* Return the entire driver ports structure to a user app. * Return the entire driver ports structure to a user app.
*/ */
static int stli_getportstruct(stliport_t __user *arg) static int stli_getportstruct(struct stliport __user *arg)
{ {
stliport_t *portp; struct stliport *portp;
if (copy_from_user(&stli_dummyport, arg, sizeof(stliport_t))) if (copy_from_user(&stli_dummyport, arg, sizeof(struct stliport)))
return -EFAULT; return -EFAULT;
portp = stli_getport(stli_dummyport.brdnr, stli_dummyport.panelnr, portp = stli_getport(stli_dummyport.brdnr, stli_dummyport.panelnr,
stli_dummyport.portnr); stli_dummyport.portnr);
if (!portp) if (!portp)
return -ENODEV; return -ENODEV;
if (copy_to_user(arg, portp, sizeof(stliport_t))) if (copy_to_user(arg, portp, sizeof(struct stliport)))
return -EFAULT; return -EFAULT;
return 0; return 0;
} }
...@@ -4426,18 +4424,18 @@ static int stli_getportstruct(stliport_t __user *arg) ...@@ -4426,18 +4424,18 @@ static int stli_getportstruct(stliport_t __user *arg)
* Return the entire driver board structure to a user app. * Return the entire driver board structure to a user app.
*/ */
static int stli_getbrdstruct(stlibrd_t __user *arg) static int stli_getbrdstruct(struct stlibrd __user *arg)
{ {
stlibrd_t *brdp; struct stlibrd *brdp;
if (copy_from_user(&stli_dummybrd, arg, sizeof(stlibrd_t))) if (copy_from_user(&stli_dummybrd, arg, sizeof(struct stlibrd)))
return -EFAULT; return -EFAULT;
if ((stli_dummybrd.brdnr < 0) || (stli_dummybrd.brdnr >= STL_MAXBRDS)) if ((stli_dummybrd.brdnr < 0) || (stli_dummybrd.brdnr >= STL_MAXBRDS))
return -ENODEV; return -ENODEV;
brdp = stli_brds[stli_dummybrd.brdnr]; brdp = stli_brds[stli_dummybrd.brdnr];
if (!brdp) if (!brdp)
return -ENODEV; return -ENODEV;
if (copy_to_user(arg, brdp, sizeof(stlibrd_t))) if (copy_to_user(arg, brdp, sizeof(struct stlibrd)))
return -EFAULT; return -EFAULT;
return 0; return 0;
} }
...@@ -4452,7 +4450,7 @@ static int stli_getbrdstruct(stlibrd_t __user *arg) ...@@ -4452,7 +4450,7 @@ static int stli_getbrdstruct(stlibrd_t __user *arg)
static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg) static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg)
{ {
stlibrd_t *brdp; struct stlibrd *brdp;
int brdnr, rc, done; int brdnr, rc, done;
void __user *argp = (void __user *)arg; void __user *argp = (void __user *)arg;
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
* communication with the slave board will always be on a per port * communication with the slave board will always be on a per port
* basis. * basis.
*/ */
typedef struct { struct stliport {
unsigned long magic; unsigned long magic;
int portnr; int portnr;
int panelnr; int panelnr;
...@@ -72,7 +72,7 @@ typedef struct { ...@@ -72,7 +72,7 @@ typedef struct {
wait_queue_head_t close_wait; wait_queue_head_t close_wait;
wait_queue_head_t raw_wait; wait_queue_head_t raw_wait;
struct work_struct tqhangup; struct work_struct tqhangup;
asysigs_t asig; struct asysigs asig;
unsigned long addr; unsigned long addr;
unsigned long rxoffset; unsigned long rxoffset;
unsigned long txoffset; unsigned long txoffset;
...@@ -83,13 +83,13 @@ typedef struct { ...@@ -83,13 +83,13 @@ typedef struct {
unsigned char reqbit; unsigned char reqbit;
unsigned char portidx; unsigned char portidx;
unsigned char portbit; unsigned char portbit;
} stliport_t; };
/* /*
* Use a structure of function pointers to do board level operations. * Use a structure of function pointers to do board level operations.
* These include, enable/disable, paging shared memory, interrupting, etc. * These include, enable/disable, paging shared memory, interrupting, etc.
*/ */
typedef struct stlibrd { struct stlibrd {
unsigned long magic; unsigned long magic;
int brdnr; int brdnr;
int brdtype; int brdtype;
...@@ -116,8 +116,8 @@ typedef struct stlibrd { ...@@ -116,8 +116,8 @@ typedef struct stlibrd {
void __iomem *(*getmemptr)(struct stlibrd *brdp, unsigned long offset, int line); void __iomem *(*getmemptr)(struct stlibrd *brdp, unsigned long offset, int line);
void (*intr)(struct stlibrd *brdp); void (*intr)(struct stlibrd *brdp);
void (*reset)(struct stlibrd *brdp); void (*reset)(struct stlibrd *brdp);
stliport_t *ports[STL_MAXPORTS]; struct stliport *ports[STL_MAXPORTS];
} stlibrd_t; };
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment