Commit 71bf9ee9 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse: stallion

stallion annotated, cleaned up, a bunch of useless verify_area()
removed.
Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent fe4c2723
...@@ -504,13 +504,13 @@ static int stl_readproc(char *page, char **start, off_t off, int count, int *eof ...@@ -504,13 +504,13 @@ static int stl_readproc(char *page, char **start, off_t off, int count, int *eof
static int stl_brdinit(stlbrd_t *brdp); static int stl_brdinit(stlbrd_t *brdp);
static int stl_initports(stlbrd_t *brdp, stlpanel_t *panelp); static int stl_initports(stlbrd_t *brdp, stlpanel_t *panelp);
static int stl_mapirq(int irq, char *name); static int stl_mapirq(int irq, char *name);
static int stl_getserial(stlport_t *portp, struct serial_struct *sp); static int stl_getserial(stlport_t *portp, struct serial_struct __user *sp);
static int stl_setserial(stlport_t *portp, struct serial_struct *sp); static int stl_setserial(stlport_t *portp, struct serial_struct __user *sp);
static int stl_getbrdstats(combrd_t *bp); static int stl_getbrdstats(combrd_t __user *bp);
static int stl_getportstats(stlport_t *portp, comstats_t *cp); static int stl_getportstats(stlport_t *portp, comstats_t __user *cp);
static int stl_clrportstats(stlport_t *portp, comstats_t *cp); static int stl_clrportstats(stlport_t *portp, comstats_t __user *cp);
static int stl_getportstruct(unsigned long arg); static int stl_getportstruct(stlport_t __user *arg);
static int stl_getbrdstruct(unsigned long arg); static int stl_getbrdstruct(stlbrd_t __user *arg);
static int stl_waitcarrier(stlport_t *portp, struct file *filp); static int stl_waitcarrier(stlport_t *portp, struct file *filp);
static void stl_delay(int len); static void stl_delay(int len);
static void stl_eiointr(stlbrd_t *brdp); static void stl_eiointr(stlbrd_t *brdp);
...@@ -745,7 +745,7 @@ static int __init stallion_module_init(void) ...@@ -745,7 +745,7 @@ static int __init stallion_module_init(void)
{ {
unsigned long flags; unsigned long flags;
#if DEBUG #ifdef DEBUG
printk("init_module()\n"); printk("init_module()\n");
#endif #endif
...@@ -767,7 +767,7 @@ static void __exit stallion_module_exit(void) ...@@ -767,7 +767,7 @@ static void __exit stallion_module_exit(void)
unsigned long flags; unsigned long flags;
int i, j, k; int i, j, k;
#if DEBUG #ifdef DEBUG
printk("cleanup_module()\n"); printk("cleanup_module()\n");
#endif #endif
...@@ -847,13 +847,13 @@ module_exit(stallion_module_exit); ...@@ -847,13 +847,13 @@ module_exit(stallion_module_exit);
* Check for any arguments passed in on the module load command line. * Check for any arguments passed in on the module load command line.
*/ */
static void stl_argbrds() static void stl_argbrds(void)
{ {
stlconf_t conf; stlconf_t conf;
stlbrd_t *brdp; stlbrd_t *brdp;
int nrargs, i; int nrargs, i;
#if DEBUG #ifdef DEBUG
printk("stl_argbrds()\n"); printk("stl_argbrds()\n");
#endif #endif
...@@ -923,7 +923,7 @@ static int stl_parsebrd(stlconf_t *confp, char **argp) ...@@ -923,7 +923,7 @@ static int stl_parsebrd(stlconf_t *confp, char **argp)
char *sp; char *sp;
int nrbrdnames, i; int nrbrdnames, i;
#if DEBUG #ifdef DEBUG
printk("stl_parsebrd(confp=%x,argp=%x)\n", (int) confp, (int) argp); printk("stl_parsebrd(confp=%x,argp=%x)\n", (int) confp, (int) argp);
#endif #endif
...@@ -978,7 +978,7 @@ static void *stl_memalloc(int len) ...@@ -978,7 +978,7 @@ static void *stl_memalloc(int len)
* 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 stlbrd_t *stl_allocbrd() static stlbrd_t *stl_allocbrd(void)
{ {
stlbrd_t *brdp; stlbrd_t *brdp;
...@@ -1003,7 +1003,7 @@ static int stl_open(struct tty_struct *tty, struct file *filp) ...@@ -1003,7 +1003,7 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
unsigned int minordev; unsigned int minordev;
int brdnr, panelnr, portnr, rc; int brdnr, panelnr, portnr, rc;
#if DEBUG #ifdef DEBUG
printk("stl_open(tty=%x,filp=%x): device=%s\n", (int) tty, printk("stl_open(tty=%x,filp=%x): device=%s\n", (int) tty,
(int) filp, tty->name); (int) filp, tty->name);
#endif #endif
...@@ -1096,7 +1096,7 @@ static int stl_waitcarrier(stlport_t *portp, struct file *filp) ...@@ -1096,7 +1096,7 @@ static int stl_waitcarrier(stlport_t *portp, struct file *filp)
unsigned long flags; unsigned long flags;
int rc, doclocal; int rc, doclocal;
#if DEBUG #ifdef DEBUG
printk("stl_waitcarrier(portp=%x,filp=%x)\n", (int) portp, (int) filp); printk("stl_waitcarrier(portp=%x,filp=%x)\n", (int) portp, (int) filp);
#endif #endif
...@@ -1148,7 +1148,7 @@ static void stl_close(struct tty_struct *tty, struct file *filp) ...@@ -1148,7 +1148,7 @@ static void stl_close(struct tty_struct *tty, struct file *filp)
stlport_t *portp; stlport_t *portp;
unsigned long flags; unsigned long flags;
#if DEBUG #ifdef DEBUG
printk("stl_close(tty=%x,filp=%x)\n", (int) tty, (int) filp); printk("stl_close(tty=%x,filp=%x)\n", (int) tty, (int) filp);
#endif #endif
...@@ -1224,7 +1224,7 @@ static void stl_close(struct tty_struct *tty, struct file *filp) ...@@ -1224,7 +1224,7 @@ static void stl_close(struct tty_struct *tty, struct file *filp)
static void stl_delay(int len) static void stl_delay(int len)
{ {
#if DEBUG #ifdef DEBUG
printk("stl_delay(len=%d)\n", len); printk("stl_delay(len=%d)\n", len);
#endif #endif
if (len > 0) { if (len > 0) {
...@@ -1247,7 +1247,7 @@ static int stl_write(struct tty_struct *tty, int from_user, const unsigned char ...@@ -1247,7 +1247,7 @@ static int stl_write(struct tty_struct *tty, int from_user, const unsigned char
unsigned char *chbuf; unsigned char *chbuf;
char *head, *tail; char *head, *tail;
#if DEBUG #ifdef DEBUG
printk("stl_write(tty=%x,from_user=%d,buf=%x,count=%d)\n", printk("stl_write(tty=%x,from_user=%d,buf=%x,count=%d)\n",
(int) tty, from_user, (int) buf, count); (int) tty, from_user, (int) buf, count);
#endif #endif
...@@ -1324,7 +1324,7 @@ static void stl_putchar(struct tty_struct *tty, unsigned char ch) ...@@ -1324,7 +1324,7 @@ static void stl_putchar(struct tty_struct *tty, unsigned char ch)
unsigned int len; unsigned int len;
char *head, *tail; char *head, *tail;
#if DEBUG #ifdef DEBUG
printk("stl_putchar(tty=%x,ch=%x)\n", (int) tty, (int) ch); printk("stl_putchar(tty=%x,ch=%x)\n", (int) tty, (int) ch);
#endif #endif
...@@ -1362,7 +1362,7 @@ static void stl_flushchars(struct tty_struct *tty) ...@@ -1362,7 +1362,7 @@ static void stl_flushchars(struct tty_struct *tty)
{ {
stlport_t *portp; stlport_t *portp;
#if DEBUG #ifdef DEBUG
printk("stl_flushchars(tty=%x)\n", (int) tty); printk("stl_flushchars(tty=%x)\n", (int) tty);
#endif #endif
...@@ -1389,7 +1389,7 @@ static int stl_writeroom(struct tty_struct *tty) ...@@ -1389,7 +1389,7 @@ static int stl_writeroom(struct tty_struct *tty)
stlport_t *portp; stlport_t *portp;
char *head, *tail; char *head, *tail;
#if DEBUG #ifdef DEBUG
printk("stl_writeroom(tty=%x)\n", (int) tty); printk("stl_writeroom(tty=%x)\n", (int) tty);
#endif #endif
...@@ -1423,7 +1423,7 @@ static int stl_charsinbuffer(struct tty_struct *tty) ...@@ -1423,7 +1423,7 @@ static int stl_charsinbuffer(struct tty_struct *tty)
unsigned int size; unsigned int size;
char *head, *tail; char *head, *tail;
#if DEBUG #ifdef DEBUG
printk("stl_charsinbuffer(tty=%x)\n", (int) tty); printk("stl_charsinbuffer(tty=%x)\n", (int) tty);
#endif #endif
...@@ -1449,12 +1449,12 @@ static int stl_charsinbuffer(struct tty_struct *tty) ...@@ -1449,12 +1449,12 @@ static int stl_charsinbuffer(struct tty_struct *tty)
* Generate the serial struct info. * Generate the serial struct info.
*/ */
static int stl_getserial(stlport_t *portp, struct serial_struct *sp) static int stl_getserial(stlport_t *portp, struct serial_struct __user *sp)
{ {
struct serial_struct sio; struct serial_struct sio;
stlbrd_t *brdp; stlbrd_t *brdp;
#if DEBUG #ifdef DEBUG
printk("stl_getserial(portp=%x,sp=%x)\n", (int) portp, (int) sp); printk("stl_getserial(portp=%x,sp=%x)\n", (int) portp, (int) sp);
#endif #endif
...@@ -1490,11 +1490,11 @@ static int stl_getserial(stlport_t *portp, struct serial_struct *sp) ...@@ -1490,11 +1490,11 @@ static int stl_getserial(stlport_t *portp, struct serial_struct *sp)
* just quietly ignore any requests to change irq, etc. * just quietly ignore any requests to change irq, etc.
*/ */
static int stl_setserial(stlport_t *portp, struct serial_struct *sp) static int stl_setserial(stlport_t *portp, struct serial_struct __user *sp)
{ {
struct serial_struct sio; struct serial_struct sio;
#if DEBUG #ifdef DEBUG
printk("stl_setserial(portp=%x,sp=%x)\n", (int) portp, (int) sp); printk("stl_setserial(portp=%x,sp=%x)\n", (int) portp, (int) sp);
#endif #endif
...@@ -1567,8 +1567,9 @@ static int stl_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd ...@@ -1567,8 +1567,9 @@ static int stl_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd
stlport_t *portp; stlport_t *portp;
unsigned int ival; unsigned int ival;
int rc; int rc;
void __user *argp = (void __user *)arg;
#if DEBUG #ifdef DEBUG
printk("stl_ioctl(tty=%x,file=%x,cmd=%x,arg=%x)\n", printk("stl_ioctl(tty=%x,file=%x,cmd=%x,arg=%x)\n",
(int) tty, (int) file, cmd, (int) arg); (int) tty, (int) file, cmd, (int) arg);
#endif #endif
...@@ -1590,36 +1591,26 @@ static int stl_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd ...@@ -1590,36 +1591,26 @@ static int stl_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd
switch (cmd) { switch (cmd) {
case TIOCGSOFTCAR: case TIOCGSOFTCAR:
rc = put_user(((tty->termios->c_cflag & CLOCAL) ? 1 : 0), rc = put_user(((tty->termios->c_cflag & CLOCAL) ? 1 : 0),
(unsigned int *) arg); (unsigned __user *) argp);
break; break;
case TIOCSSOFTCAR: case TIOCSSOFTCAR:
if ((rc = verify_area(VERIFY_READ, (void *) arg, if (get_user(ival, (unsigned int __user *) arg))
sizeof(int))) == 0) { return -EFAULT;
get_user(ival, (unsigned int *) arg);
tty->termios->c_cflag = tty->termios->c_cflag =
(tty->termios->c_cflag & ~CLOCAL) | (tty->termios->c_cflag & ~CLOCAL) |
(ival ? CLOCAL : 0); (ival ? CLOCAL : 0);
}
break; break;
case TIOCGSERIAL: case TIOCGSERIAL:
if ((rc = verify_area(VERIFY_WRITE, (void *) arg, rc = stl_getserial(portp, argp);
sizeof(struct serial_struct))) == 0)
rc = stl_getserial(portp, (struct serial_struct *) arg);
break; break;
case TIOCSSERIAL: case TIOCSSERIAL:
if ((rc = verify_area(VERIFY_READ, (void *) arg, rc = stl_setserial(portp, argp);
sizeof(struct serial_struct))) == 0)
rc = stl_setserial(portp, (struct serial_struct *) arg);
break; break;
case COM_GETPORTSTATS: case COM_GETPORTSTATS:
if ((rc = verify_area(VERIFY_WRITE, (void *) arg, rc = stl_getportstats(portp, argp);
sizeof(comstats_t))) == 0)
rc = stl_getportstats(portp, (comstats_t *) arg);
break; break;
case COM_CLRPORTSTATS: case COM_CLRPORTSTATS:
if ((rc = verify_area(VERIFY_WRITE, (void *) arg, rc = stl_clrportstats(portp, argp);
sizeof(comstats_t))) == 0)
rc = stl_clrportstats(portp, (comstats_t *) arg);
break; break;
case TIOCSERCONFIG: case TIOCSERCONFIG:
case TIOCSERGWILD: case TIOCSERGWILD:
...@@ -1643,7 +1634,7 @@ static void stl_settermios(struct tty_struct *tty, struct termios *old) ...@@ -1643,7 +1634,7 @@ static void stl_settermios(struct tty_struct *tty, struct termios *old)
stlport_t *portp; stlport_t *portp;
struct termios *tiosp; struct termios *tiosp;
#if DEBUG #ifdef DEBUG
printk("stl_settermios(tty=%x,old=%x)\n", (int) tty, (int) old); printk("stl_settermios(tty=%x,old=%x)\n", (int) tty, (int) old);
#endif #endif
...@@ -1680,7 +1671,7 @@ static void stl_throttle(struct tty_struct *tty) ...@@ -1680,7 +1671,7 @@ static void stl_throttle(struct tty_struct *tty)
{ {
stlport_t *portp; stlport_t *portp;
#if DEBUG #ifdef DEBUG
printk("stl_throttle(tty=%x)\n", (int) tty); printk("stl_throttle(tty=%x)\n", (int) tty);
#endif #endif
...@@ -1702,7 +1693,7 @@ static void stl_unthrottle(struct tty_struct *tty) ...@@ -1702,7 +1693,7 @@ static void stl_unthrottle(struct tty_struct *tty)
{ {
stlport_t *portp; stlport_t *portp;
#if DEBUG #ifdef DEBUG
printk("stl_unthrottle(tty=%x)\n", (int) tty); printk("stl_unthrottle(tty=%x)\n", (int) tty);
#endif #endif
...@@ -1725,7 +1716,7 @@ static void stl_stop(struct tty_struct *tty) ...@@ -1725,7 +1716,7 @@ static void stl_stop(struct tty_struct *tty)
{ {
stlport_t *portp; stlport_t *portp;
#if DEBUG #ifdef DEBUG
printk("stl_stop(tty=%x)\n", (int) tty); printk("stl_stop(tty=%x)\n", (int) tty);
#endif #endif
...@@ -1747,7 +1738,7 @@ static void stl_start(struct tty_struct *tty) ...@@ -1747,7 +1738,7 @@ static void stl_start(struct tty_struct *tty)
{ {
stlport_t *portp; stlport_t *portp;
#if DEBUG #ifdef DEBUG
printk("stl_start(tty=%x)\n", (int) tty); printk("stl_start(tty=%x)\n", (int) tty);
#endif #endif
...@@ -1771,7 +1762,7 @@ static void stl_hangup(struct tty_struct *tty) ...@@ -1771,7 +1762,7 @@ static void stl_hangup(struct tty_struct *tty)
{ {
stlport_t *portp; stlport_t *portp;
#if DEBUG #ifdef DEBUG
printk("stl_hangup(tty=%x)\n", (int) tty); printk("stl_hangup(tty=%x)\n", (int) tty);
#endif #endif
...@@ -1807,7 +1798,7 @@ static void stl_flushbuffer(struct tty_struct *tty) ...@@ -1807,7 +1798,7 @@ static void stl_flushbuffer(struct tty_struct *tty)
{ {
stlport_t *portp; stlport_t *portp;
#if DEBUG #ifdef DEBUG
printk("stl_flushbuffer(tty=%x)\n", (int) tty); printk("stl_flushbuffer(tty=%x)\n", (int) tty);
#endif #endif
...@@ -1830,7 +1821,7 @@ static void stl_breakctl(struct tty_struct *tty, int state) ...@@ -1830,7 +1821,7 @@ static void stl_breakctl(struct tty_struct *tty, int state)
{ {
stlport_t *portp; stlport_t *portp;
#if DEBUG #ifdef DEBUG
printk("stl_breakctl(tty=%x,state=%d)\n", (int) tty, state); printk("stl_breakctl(tty=%x,state=%d)\n", (int) tty, state);
#endif #endif
...@@ -1850,7 +1841,7 @@ static void stl_waituntilsent(struct tty_struct *tty, int timeout) ...@@ -1850,7 +1841,7 @@ static void stl_waituntilsent(struct tty_struct *tty, int timeout)
stlport_t *portp; stlport_t *portp;
unsigned long tend; unsigned long tend;
#if DEBUG #ifdef DEBUG
printk("stl_waituntilsent(tty=%x,timeout=%d)\n", (int) tty, timeout); printk("stl_waituntilsent(tty=%x,timeout=%d)\n", (int) tty, timeout);
#endif #endif
...@@ -1879,7 +1870,7 @@ static void stl_sendxchar(struct tty_struct *tty, char ch) ...@@ -1879,7 +1870,7 @@ static void stl_sendxchar(struct tty_struct *tty, char ch)
{ {
stlport_t *portp; stlport_t *portp;
#if DEBUG #ifdef DEBUG
printk("stl_sendxchar(tty=%x,ch=%x)\n", (int) tty, ch); printk("stl_sendxchar(tty=%x,ch=%x)\n", (int) tty, ch);
#endif #endif
...@@ -1960,7 +1951,7 @@ static int stl_readproc(char *page, char **start, off_t off, int count, int *eof ...@@ -1960,7 +1951,7 @@ static int stl_readproc(char *page, char **start, off_t off, int count, int *eof
int curoff, maxoff; int curoff, maxoff;
char *pos; char *pos;
#if DEBUG #ifdef DEBUG
printk("stl_readproc(page=%x,start=%x,off=%x,count=%d,eof=%x," printk("stl_readproc(page=%x,start=%x,off=%x,count=%d,eof=%x,"
"data=%x\n", (int) page, (int) start, (int) off, count, "data=%x\n", (int) page, (int) start, (int) off, count,
(int) eof, (int) data); (int) eof, (int) data);
...@@ -2043,7 +2034,7 @@ static irqreturn_t stl_intr(int irq, void *dev_id, struct pt_regs *regs) ...@@ -2043,7 +2034,7 @@ static irqreturn_t stl_intr(int irq, void *dev_id, struct pt_regs *regs)
int i; int i;
int handled = 0; int handled = 0;
#if DEBUG #ifdef DEBUG
printk("stl_intr(irq=%d,regs=%x)\n", irq, (int) regs); printk("stl_intr(irq=%d,regs=%x)\n", irq, (int) regs);
#endif #endif
...@@ -2189,7 +2180,7 @@ static void stl_offintr(void *private) ...@@ -2189,7 +2180,7 @@ static void stl_offintr(void *private)
portp = private; portp = private;
#if DEBUG #ifdef DEBUG
printk("stl_offintr(portp=%x)\n", (int) portp); printk("stl_offintr(portp=%x)\n", (int) portp);
#endif #endif
...@@ -2233,7 +2224,7 @@ static int __init stl_mapirq(int irq, char *name) ...@@ -2233,7 +2224,7 @@ static int __init stl_mapirq(int irq, char *name)
{ {
int rc, i; int rc, i;
#if DEBUG #ifdef DEBUG
printk("stl_mapirq(irq=%d,name=%s)\n", irq, name); printk("stl_mapirq(irq=%d,name=%s)\n", irq, name);
#endif #endif
...@@ -2265,7 +2256,7 @@ static int __init stl_initports(stlbrd_t *brdp, stlpanel_t *panelp) ...@@ -2265,7 +2256,7 @@ static int __init stl_initports(stlbrd_t *brdp, stlpanel_t *panelp)
stlport_t *portp; stlport_t *portp;
int chipmask, i; int chipmask, i;
#if DEBUG #ifdef DEBUG
printk("stl_initports(brdp=%x,panelp=%x)\n", (int) brdp, (int) panelp); printk("stl_initports(brdp=%x,panelp=%x)\n", (int) brdp, (int) panelp);
#endif #endif
...@@ -2319,7 +2310,7 @@ static inline int stl_initeio(stlbrd_t *brdp) ...@@ -2319,7 +2310,7 @@ static inline int stl_initeio(stlbrd_t *brdp)
char *name; char *name;
int rc; int rc;
#if DEBUG #ifdef DEBUG
printk("stl_initeio(brdp=%x)\n", (int) brdp); printk("stl_initeio(brdp=%x)\n", (int) brdp);
#endif #endif
...@@ -2457,7 +2448,7 @@ static inline int stl_initech(stlbrd_t *brdp) ...@@ -2457,7 +2448,7 @@ static inline int stl_initech(stlbrd_t *brdp)
int panelnr, banknr, i; int panelnr, banknr, i;
char *name; char *name;
#if DEBUG #ifdef DEBUG
printk("stl_initech(brdp=%x)\n", (int) brdp); printk("stl_initech(brdp=%x)\n", (int) brdp);
#endif #endif
...@@ -2661,7 +2652,7 @@ static int __init stl_brdinit(stlbrd_t *brdp) ...@@ -2661,7 +2652,7 @@ static int __init stl_brdinit(stlbrd_t *brdp)
{ {
int i; int i;
#if DEBUG #ifdef DEBUG
printk("stl_brdinit(brdp=%x)\n", (int) brdp); printk("stl_brdinit(brdp=%x)\n", (int) brdp);
#endif #endif
...@@ -2707,7 +2698,7 @@ static int __init stl_brdinit(stlbrd_t *brdp) ...@@ -2707,7 +2698,7 @@ static int __init stl_brdinit(stlbrd_t *brdp)
* Find the next available board number that is free. * Find the next available board number that is free.
*/ */
static inline int stl_getbrdnr() static inline int stl_getbrdnr(void)
{ {
int i; int i;
...@@ -2735,7 +2726,7 @@ static inline int stl_initpcibrd(int brdtype, struct pci_dev *devp) ...@@ -2735,7 +2726,7 @@ static inline int stl_initpcibrd(int brdtype, struct pci_dev *devp)
{ {
stlbrd_t *brdp; stlbrd_t *brdp;
#if DEBUG #ifdef DEBUG
printk("stl_initpcibrd(brdtype=%d,busnr=%x,devnr=%x)\n", brdtype, printk("stl_initpcibrd(brdtype=%d,busnr=%x,devnr=%x)\n", brdtype,
devp->bus->number, devp->devfn); devp->bus->number, devp->devfn);
#endif #endif
...@@ -2755,7 +2746,7 @@ static inline int stl_initpcibrd(int brdtype, struct pci_dev *devp) ...@@ -2755,7 +2746,7 @@ static inline int stl_initpcibrd(int brdtype, struct pci_dev *devp)
* Different Stallion boards use the BAR registers in different ways, * Different Stallion boards use the BAR registers in different ways,
* so set up io addresses based on board type. * so set up io addresses based on board type.
*/ */
#if DEBUG #ifdef DEBUG
printk("%s(%d): BAR[]=%x,%x,%x,%x IRQ=%x\n", __FILE__, __LINE__, printk("%s(%d): BAR[]=%x,%x,%x,%x IRQ=%x\n", __FILE__, __LINE__,
pci_resource_start(devp, 0), pci_resource_start(devp, 1), pci_resource_start(devp, 0), pci_resource_start(devp, 1),
pci_resource_start(devp, 2), pci_resource_start(devp, 3), devp->irq); pci_resource_start(devp, 2), pci_resource_start(devp, 3), devp->irq);
...@@ -2797,12 +2788,12 @@ static inline int stl_initpcibrd(int brdtype, struct pci_dev *devp) ...@@ -2797,12 +2788,12 @@ static inline int stl_initpcibrd(int brdtype, struct pci_dev *devp)
*/ */
static inline int stl_findpcibrds() static inline int stl_findpcibrds(void)
{ {
struct pci_dev *dev = NULL; struct pci_dev *dev = NULL;
int i, rc; int i, rc;
#if DEBUG #ifdef DEBUG
printk("stl_findpcibrds()\n"); printk("stl_findpcibrds()\n");
#endif #endif
...@@ -2835,13 +2826,13 @@ static inline int stl_findpcibrds() ...@@ -2835,13 +2826,13 @@ static inline int stl_findpcibrds()
* since the initial search and setup is too different. * since the initial search and setup is too different.
*/ */
static inline int stl_initbrds() static inline int stl_initbrds(void)
{ {
stlbrd_t *brdp; stlbrd_t *brdp;
stlconf_t *confp; stlconf_t *confp;
int i; int i;
#if DEBUG #ifdef DEBUG
printk("stl_initbrds()\n"); printk("stl_initbrds()\n");
#endif #endif
...@@ -2891,7 +2882,7 @@ static inline int stl_initbrds() ...@@ -2891,7 +2882,7 @@ static inline int stl_initbrds()
* Return the board stats structure to user app. * Return the board stats structure to user app.
*/ */
static int stl_getbrdstats(combrd_t *bp) static int stl_getbrdstats(combrd_t __user *bp)
{ {
stlbrd_t *brdp; stlbrd_t *brdp;
stlpanel_t *panelp; stlpanel_t *panelp;
...@@ -2959,12 +2950,12 @@ static stlport_t *stl_getport(int brdnr, int panelnr, int portnr) ...@@ -2959,12 +2950,12 @@ static stlport_t *stl_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 stl_getportstats(stlport_t *portp, comstats_t *cp) static int stl_getportstats(stlport_t *portp, comstats_t __user *cp)
{ {
unsigned char *head, *tail; unsigned char *head, *tail;
unsigned long flags; unsigned long flags;
if (portp == (stlport_t *) NULL) { if (!portp) {
if (copy_from_user(&stl_comstats, cp, sizeof(comstats_t))) if (copy_from_user(&stl_comstats, cp, sizeof(comstats_t)))
return -EFAULT; return -EFAULT;
portp = stl_getport(stl_comstats.brd, stl_comstats.panel, portp = stl_getport(stl_comstats.brd, stl_comstats.panel,
...@@ -3017,9 +3008,9 @@ static int stl_getportstats(stlport_t *portp, comstats_t *cp) ...@@ -3017,9 +3008,9 @@ static int stl_getportstats(stlport_t *portp, comstats_t *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 stl_clrportstats(stlport_t *portp, comstats_t *cp) static int stl_clrportstats(stlport_t *portp, comstats_t __user *cp)
{ {
if (portp == (stlport_t *) NULL) { if (!portp) {
if (copy_from_user(&stl_comstats, cp, sizeof(comstats_t))) if (copy_from_user(&stl_comstats, cp, sizeof(comstats_t)))
return -EFAULT; return -EFAULT;
portp = stl_getport(stl_comstats.brd, stl_comstats.panel, portp = stl_getport(stl_comstats.brd, stl_comstats.panel,
...@@ -3042,18 +3033,17 @@ static int stl_clrportstats(stlport_t *portp, comstats_t *cp) ...@@ -3042,18 +3033,17 @@ static int stl_clrportstats(stlport_t *portp, comstats_t *cp)
* Return the entire driver ports structure to a user app. * Return the entire driver ports structure to a user app.
*/ */
static int stl_getportstruct(unsigned long arg) static int stl_getportstruct(stlport_t __user *arg)
{ {
stlport_t *portp; stlport_t *portp;
if (copy_from_user(&stl_dummyport, (void *) arg, sizeof(stlport_t))) if (copy_from_user(&stl_dummyport, arg, sizeof(stlport_t)))
return -EFAULT; return -EFAULT;
portp = stl_getport(stl_dummyport.brdnr, stl_dummyport.panelnr, portp = stl_getport(stl_dummyport.brdnr, stl_dummyport.panelnr,
stl_dummyport.portnr); stl_dummyport.portnr);
if (portp == (stlport_t *) NULL) if (!portp)
return(-ENODEV); return -ENODEV;
return copy_to_user((void *)arg, portp, return copy_to_user(arg, portp, sizeof(stlport_t)) ? -EFAULT : 0;
sizeof(stlport_t)) ? -EFAULT : 0;
} }
/*****************************************************************************/ /*****************************************************************************/
...@@ -3062,18 +3052,18 @@ static int stl_getportstruct(unsigned long arg) ...@@ -3062,18 +3052,18 @@ static int stl_getportstruct(unsigned long arg)
* Return the entire driver board structure to a user app. * Return the entire driver board structure to a user app.
*/ */
static int stl_getbrdstruct(unsigned long arg) static int stl_getbrdstruct(stlbrd_t __user *arg)
{ {
stlbrd_t *brdp; stlbrd_t *brdp;
if (copy_from_user(&stl_dummybrd, (void *) arg, sizeof(stlbrd_t))) if (copy_from_user(&stl_dummybrd, arg, sizeof(stlbrd_t)))
return -EFAULT; return -EFAULT;
if ((stl_dummybrd.brdnr < 0) || (stl_dummybrd.brdnr >= STL_MAXBRDS)) if ((stl_dummybrd.brdnr < 0) || (stl_dummybrd.brdnr >= STL_MAXBRDS))
return(-ENODEV); return -ENODEV;
brdp = stl_brds[stl_dummybrd.brdnr]; brdp = stl_brds[stl_dummybrd.brdnr];
if (brdp == (stlbrd_t *) NULL) if (!brdp)
return(-ENODEV); return(-ENODEV);
return copy_to_user((void *)arg, brdp, sizeof(stlbrd_t)) ? -EFAULT : 0; return copy_to_user(arg, brdp, sizeof(stlbrd_t)) ? -EFAULT : 0;
} }
/*****************************************************************************/ /*****************************************************************************/
...@@ -3087,8 +3077,9 @@ static int stl_getbrdstruct(unsigned long arg) ...@@ -3087,8 +3077,9 @@ static int stl_getbrdstruct(unsigned long arg)
static int stl_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg) static int stl_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg)
{ {
int brdnr, rc; int brdnr, rc;
void __user *argp = (void __user *)arg;
#if DEBUG #ifdef DEBUG
printk("stl_memioctl(ip=%x,fp=%x,cmd=%x,arg=%x)\n", (int) ip, printk("stl_memioctl(ip=%x,fp=%x,cmd=%x,arg=%x)\n", (int) ip,
(int) fp, cmd, (int) arg); (int) fp, cmd, (int) arg);
#endif #endif
...@@ -3100,31 +3091,19 @@ static int stl_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, uns ...@@ -3100,31 +3091,19 @@ static int stl_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, uns
switch (cmd) { switch (cmd) {
case COM_GETPORTSTATS: case COM_GETPORTSTATS:
if ((rc = verify_area(VERIFY_WRITE, (void *) arg, rc = stl_getportstats(NULL, argp);
sizeof(comstats_t))) == 0)
rc = stl_getportstats((stlport_t *) NULL,
(comstats_t *) arg);
break; break;
case COM_CLRPORTSTATS: case COM_CLRPORTSTATS:
if ((rc = verify_area(VERIFY_WRITE, (void *) arg, rc = stl_clrportstats(NULL, argp);
sizeof(comstats_t))) == 0)
rc = stl_clrportstats((stlport_t *) NULL,
(comstats_t *) arg);
break; break;
case COM_GETBRDSTATS: case COM_GETBRDSTATS:
if ((rc = verify_area(VERIFY_WRITE, (void *) arg, rc = stl_getbrdstats(argp);
sizeof(combrd_t))) == 0)
rc = stl_getbrdstats((combrd_t *) arg);
break; break;
case COM_READPORT: case COM_READPORT:
if ((rc = verify_area(VERIFY_WRITE, (void *) arg, rc = stl_getportstruct(argp);
sizeof(stlport_t))) == 0)
rc = stl_getportstruct(arg);
break; break;
case COM_READBOARD: case COM_READBOARD:
if ((rc = verify_area(VERIFY_WRITE, (void *) arg, rc = stl_getbrdstruct(argp);
sizeof(stlbrd_t))) == 0)
rc = stl_getbrdstruct(arg);
break; break;
default: default:
rc = -ENOIOCTLCMD; rc = -ENOIOCTLCMD;
...@@ -3262,7 +3241,7 @@ static int stl_cd1400panelinit(stlbrd_t *brdp, stlpanel_t *panelp) ...@@ -3262,7 +3241,7 @@ static int stl_cd1400panelinit(stlbrd_t *brdp, stlpanel_t *panelp)
int chipmask, i, j; int chipmask, i, j;
int nrchips, uartaddr, ioaddr; int nrchips, uartaddr, ioaddr;
#if DEBUG #ifdef DEBUG
printk("stl_panelinit(brdp=%x,panelp=%x)\n", (int) brdp, (int) panelp); printk("stl_panelinit(brdp=%x,panelp=%x)\n", (int) brdp, (int) panelp);
#endif #endif
...@@ -3314,7 +3293,7 @@ static int stl_cd1400panelinit(stlbrd_t *brdp, stlpanel_t *panelp) ...@@ -3314,7 +3293,7 @@ static int stl_cd1400panelinit(stlbrd_t *brdp, stlpanel_t *panelp)
static void stl_cd1400portinit(stlbrd_t *brdp, stlpanel_t *panelp, stlport_t *portp) static void stl_cd1400portinit(stlbrd_t *brdp, stlpanel_t *panelp, stlport_t *portp)
{ {
#if DEBUG #ifdef DEBUG
printk("stl_cd1400portinit(brdp=%x,panelp=%x,portp=%x)\n", printk("stl_cd1400portinit(brdp=%x,panelp=%x,portp=%x)\n",
(int) brdp, (int) panelp, (int) portp); (int) brdp, (int) panelp, (int) portp);
#endif #endif
...@@ -3529,7 +3508,7 @@ static void stl_cd1400setport(stlport_t *portp, struct termios *tiosp) ...@@ -3529,7 +3508,7 @@ static void stl_cd1400setport(stlport_t *portp, struct termios *tiosp)
* them all up. * them all up.
*/ */
#if DEBUG #ifdef DEBUG
printk("SETPORT: portnr=%d panelnr=%d brdnr=%d\n", printk("SETPORT: portnr=%d panelnr=%d brdnr=%d\n",
portp->portnr, portp->panelnr, portp->brdnr); portp->portnr, portp->panelnr, portp->brdnr);
printk(" cor1=%x cor2=%x cor3=%x cor4=%x cor5=%x\n", printk(" cor1=%x cor2=%x cor3=%x cor4=%x cor5=%x\n",
...@@ -3594,7 +3573,7 @@ static void stl_cd1400setsignals(stlport_t *portp, int dtr, int rts) ...@@ -3594,7 +3573,7 @@ static void stl_cd1400setsignals(stlport_t *portp, int dtr, int rts)
unsigned char msvr1, msvr2; unsigned char msvr1, msvr2;
unsigned long flags; unsigned long flags;
#if DEBUG #ifdef DEBUG
printk("stl_cd1400setsignals(portp=%x,dtr=%d,rts=%d)\n", printk("stl_cd1400setsignals(portp=%x,dtr=%d,rts=%d)\n",
(int) portp, dtr, rts); (int) portp, dtr, rts);
#endif #endif
...@@ -3630,7 +3609,7 @@ static int stl_cd1400getsignals(stlport_t *portp) ...@@ -3630,7 +3609,7 @@ static int stl_cd1400getsignals(stlport_t *portp)
unsigned long flags; unsigned long flags;
int sigs; int sigs;
#if DEBUG #ifdef DEBUG
printk("stl_cd1400getsignals(portp=%x)\n", (int) portp); printk("stl_cd1400getsignals(portp=%x)\n", (int) portp);
#endif #endif
...@@ -3668,7 +3647,7 @@ static void stl_cd1400enablerxtx(stlport_t *portp, int rx, int tx) ...@@ -3668,7 +3647,7 @@ static void stl_cd1400enablerxtx(stlport_t *portp, int rx, int tx)
unsigned char ccr; unsigned char ccr;
unsigned long flags; unsigned long flags;
#if DEBUG #ifdef DEBUG
printk("stl_cd1400enablerxtx(portp=%x,rx=%d,tx=%d)\n", printk("stl_cd1400enablerxtx(portp=%x,rx=%d,tx=%d)\n",
(int) portp, rx, tx); (int) portp, rx, tx);
#endif #endif
...@@ -3705,7 +3684,7 @@ static void stl_cd1400startrxtx(stlport_t *portp, int rx, int tx) ...@@ -3705,7 +3684,7 @@ static void stl_cd1400startrxtx(stlport_t *portp, int rx, int tx)
unsigned char sreron, sreroff; unsigned char sreron, sreroff;
unsigned long flags; unsigned long flags;
#if DEBUG #ifdef DEBUG
printk("stl_cd1400startrxtx(portp=%x,rx=%d,tx=%d)\n", printk("stl_cd1400startrxtx(portp=%x,rx=%d,tx=%d)\n",
(int) portp, rx, tx); (int) portp, rx, tx);
#endif #endif
...@@ -3745,7 +3724,7 @@ static void stl_cd1400disableintrs(stlport_t *portp) ...@@ -3745,7 +3724,7 @@ static void stl_cd1400disableintrs(stlport_t *portp)
{ {
unsigned long flags; unsigned long flags;
#if DEBUG #ifdef DEBUG
printk("stl_cd1400disableintrs(portp=%x)\n", (int) portp); printk("stl_cd1400disableintrs(portp=%x)\n", (int) portp);
#endif #endif
save_flags(flags); save_flags(flags);
...@@ -3763,7 +3742,7 @@ static void stl_cd1400sendbreak(stlport_t *portp, int len) ...@@ -3763,7 +3742,7 @@ static void stl_cd1400sendbreak(stlport_t *portp, int len)
{ {
unsigned long flags; unsigned long flags;
#if DEBUG #ifdef DEBUG
printk("stl_cd1400sendbreak(portp=%x,len=%d)\n", (int) portp, len); printk("stl_cd1400sendbreak(portp=%x,len=%d)\n", (int) portp, len);
#endif #endif
...@@ -3792,7 +3771,7 @@ static void stl_cd1400flowctrl(stlport_t *portp, int state) ...@@ -3792,7 +3771,7 @@ static void stl_cd1400flowctrl(stlport_t *portp, int state)
struct tty_struct *tty; struct tty_struct *tty;
unsigned long flags; unsigned long flags;
#if DEBUG #ifdef DEBUG
printk("stl_cd1400flowctrl(portp=%x,state=%x)\n", (int) portp, state); printk("stl_cd1400flowctrl(portp=%x,state=%x)\n", (int) portp, state);
#endif #endif
...@@ -3857,7 +3836,7 @@ static void stl_cd1400sendflow(stlport_t *portp, int state) ...@@ -3857,7 +3836,7 @@ static void stl_cd1400sendflow(stlport_t *portp, int state)
struct tty_struct *tty; struct tty_struct *tty;
unsigned long flags; unsigned long flags;
#if DEBUG #ifdef DEBUG
printk("stl_cd1400sendflow(portp=%x,state=%x)\n", (int) portp, state); printk("stl_cd1400sendflow(portp=%x,state=%x)\n", (int) portp, state);
#endif #endif
...@@ -3892,7 +3871,7 @@ static void stl_cd1400flush(stlport_t *portp) ...@@ -3892,7 +3871,7 @@ static void stl_cd1400flush(stlport_t *portp)
{ {
unsigned long flags; unsigned long flags;
#if DEBUG #ifdef DEBUG
printk("stl_cd1400flush(portp=%x)\n", (int) portp); printk("stl_cd1400flush(portp=%x)\n", (int) portp);
#endif #endif
...@@ -3922,7 +3901,7 @@ static void stl_cd1400flush(stlport_t *portp) ...@@ -3922,7 +3901,7 @@ static void stl_cd1400flush(stlport_t *portp)
static int stl_cd1400datastate(stlport_t *portp) static int stl_cd1400datastate(stlport_t *portp)
{ {
#if DEBUG #ifdef DEBUG
printk("stl_cd1400datastate(portp=%x)\n", (int) portp); printk("stl_cd1400datastate(portp=%x)\n", (int) portp);
#endif #endif
...@@ -3942,7 +3921,7 @@ static void stl_cd1400eiointr(stlpanel_t *panelp, unsigned int iobase) ...@@ -3942,7 +3921,7 @@ static void stl_cd1400eiointr(stlpanel_t *panelp, unsigned int iobase)
{ {
unsigned char svrtype; unsigned char svrtype;
#if DEBUG #ifdef DEBUG
printk("stl_cd1400eiointr(panelp=%x,iobase=%x)\n", printk("stl_cd1400eiointr(panelp=%x,iobase=%x)\n",
(int) panelp, iobase); (int) panelp, iobase);
#endif #endif
...@@ -3972,7 +3951,7 @@ static void stl_cd1400echintr(stlpanel_t *panelp, unsigned int iobase) ...@@ -3972,7 +3951,7 @@ static void stl_cd1400echintr(stlpanel_t *panelp, unsigned int iobase)
{ {
unsigned char svrtype; unsigned char svrtype;
#if DEBUG #ifdef DEBUG
printk("stl_cd1400echintr(panelp=%x,iobase=%x)\n", (int) panelp, printk("stl_cd1400echintr(panelp=%x,iobase=%x)\n", (int) panelp,
iobase); iobase);
#endif #endif
...@@ -4046,7 +4025,7 @@ static void stl_cd1400txisr(stlpanel_t *panelp, int ioaddr) ...@@ -4046,7 +4025,7 @@ static void stl_cd1400txisr(stlpanel_t *panelp, int ioaddr)
char *head, *tail; char *head, *tail;
unsigned char ioack, srer; unsigned char ioack, srer;
#if DEBUG #ifdef DEBUG
printk("stl_cd1400txisr(panelp=%x,ioaddr=%x)\n", (int) panelp, ioaddr); printk("stl_cd1400txisr(panelp=%x,ioaddr=%x)\n", (int) panelp, ioaddr);
#endif #endif
...@@ -4128,7 +4107,7 @@ static void stl_cd1400rxisr(stlpanel_t *panelp, int ioaddr) ...@@ -4128,7 +4107,7 @@ static void stl_cd1400rxisr(stlpanel_t *panelp, int ioaddr)
unsigned char status; unsigned char status;
char ch; char ch;
#if DEBUG #ifdef DEBUG
printk("stl_cd1400rxisr(panelp=%x,ioaddr=%x)\n", (int) panelp, ioaddr); printk("stl_cd1400rxisr(panelp=%x,ioaddr=%x)\n", (int) panelp, ioaddr);
#endif #endif
...@@ -4237,7 +4216,7 @@ static void stl_cd1400mdmisr(stlpanel_t *panelp, int ioaddr) ...@@ -4237,7 +4216,7 @@ static void stl_cd1400mdmisr(stlpanel_t *panelp, int ioaddr)
unsigned int ioack; unsigned int ioack;
unsigned char misr; unsigned char misr;
#if DEBUG #ifdef DEBUG
printk("stl_cd1400mdmisr(panelp=%x)\n", (int) panelp); printk("stl_cd1400mdmisr(panelp=%x)\n", (int) panelp);
#endif #endif
...@@ -4326,7 +4305,7 @@ static int stl_sc26198panelinit(stlbrd_t *brdp, stlpanel_t *panelp) ...@@ -4326,7 +4305,7 @@ static int stl_sc26198panelinit(stlbrd_t *brdp, stlpanel_t *panelp)
int chipmask, i; int chipmask, i;
int nrchips, ioaddr; int nrchips, ioaddr;
#if DEBUG #ifdef DEBUG
printk("stl_sc26198panelinit(brdp=%x,panelp=%x)\n", printk("stl_sc26198panelinit(brdp=%x,panelp=%x)\n",
(int) brdp, (int) panelp); (int) brdp, (int) panelp);
#endif #endif
...@@ -4371,7 +4350,7 @@ static int stl_sc26198panelinit(stlbrd_t *brdp, stlpanel_t *panelp) ...@@ -4371,7 +4350,7 @@ static int stl_sc26198panelinit(stlbrd_t *brdp, stlpanel_t *panelp)
static void stl_sc26198portinit(stlbrd_t *brdp, stlpanel_t *panelp, stlport_t *portp) static void stl_sc26198portinit(stlbrd_t *brdp, stlpanel_t *panelp, stlport_t *portp)
{ {
#if DEBUG #ifdef DEBUG
printk("stl_sc26198portinit(brdp=%x,panelp=%x,portp=%x)\n", printk("stl_sc26198portinit(brdp=%x,panelp=%x,portp=%x)\n",
(int) brdp, (int) panelp, (int) portp); (int) brdp, (int) panelp, (int) portp);
#endif #endif
...@@ -4548,7 +4527,7 @@ static void stl_sc26198setport(stlport_t *portp, struct termios *tiosp) ...@@ -4548,7 +4527,7 @@ static void stl_sc26198setport(stlport_t *portp, struct termios *tiosp)
* them all up. * them all up.
*/ */
#if DEBUG #ifdef DEBUG
printk("SETPORT: portnr=%d panelnr=%d brdnr=%d\n", printk("SETPORT: portnr=%d panelnr=%d brdnr=%d\n",
portp->portnr, portp->panelnr, portp->brdnr); portp->portnr, portp->panelnr, portp->brdnr);
printk(" mr0=%x mr1=%x mr2=%x clk=%x\n", mr0, mr1, mr2, clk); printk(" mr0=%x mr1=%x mr2=%x clk=%x\n", mr0, mr1, mr2, clk);
...@@ -4600,7 +4579,7 @@ static void stl_sc26198setsignals(stlport_t *portp, int dtr, int rts) ...@@ -4600,7 +4579,7 @@ static void stl_sc26198setsignals(stlport_t *portp, int dtr, int rts)
unsigned char iopioron, iopioroff; unsigned char iopioron, iopioroff;
unsigned long flags; unsigned long flags;
#if DEBUG #ifdef DEBUG
printk("stl_sc26198setsignals(portp=%x,dtr=%d,rts=%d)\n", printk("stl_sc26198setsignals(portp=%x,dtr=%d,rts=%d)\n",
(int) portp, dtr, rts); (int) portp, dtr, rts);
#endif #endif
...@@ -4637,7 +4616,7 @@ static int stl_sc26198getsignals(stlport_t *portp) ...@@ -4637,7 +4616,7 @@ static int stl_sc26198getsignals(stlport_t *portp)
unsigned long flags; unsigned long flags;
int sigs; int sigs;
#if DEBUG #ifdef DEBUG
printk("stl_sc26198getsignals(portp=%x)\n", (int) portp); printk("stl_sc26198getsignals(portp=%x)\n", (int) portp);
#endif #endif
...@@ -4668,7 +4647,7 @@ static void stl_sc26198enablerxtx(stlport_t *portp, int rx, int tx) ...@@ -4668,7 +4647,7 @@ static void stl_sc26198enablerxtx(stlport_t *portp, int rx, int tx)
unsigned char ccr; unsigned char ccr;
unsigned long flags; unsigned long flags;
#if DEBUG #ifdef DEBUG
printk("stl_sc26198enablerxtx(portp=%x,rx=%d,tx=%d)\n", printk("stl_sc26198enablerxtx(portp=%x,rx=%d,tx=%d)\n",
(int) portp, rx, tx); (int) portp, rx, tx);
#endif #endif
...@@ -4703,7 +4682,7 @@ static void stl_sc26198startrxtx(stlport_t *portp, int rx, int tx) ...@@ -4703,7 +4682,7 @@ static void stl_sc26198startrxtx(stlport_t *portp, int rx, int tx)
unsigned char imr; unsigned char imr;
unsigned long flags; unsigned long flags;
#if DEBUG #ifdef DEBUG
printk("stl_sc26198startrxtx(portp=%x,rx=%d,tx=%d)\n", printk("stl_sc26198startrxtx(portp=%x,rx=%d,tx=%d)\n",
(int) portp, rx, tx); (int) portp, rx, tx);
#endif #endif
...@@ -4739,7 +4718,7 @@ static void stl_sc26198disableintrs(stlport_t *portp) ...@@ -4739,7 +4718,7 @@ static void stl_sc26198disableintrs(stlport_t *portp)
{ {
unsigned long flags; unsigned long flags;
#if DEBUG #ifdef DEBUG
printk("stl_sc26198disableintrs(portp=%x)\n", (int) portp); printk("stl_sc26198disableintrs(portp=%x)\n", (int) portp);
#endif #endif
...@@ -4758,7 +4737,7 @@ static void stl_sc26198sendbreak(stlport_t *portp, int len) ...@@ -4758,7 +4737,7 @@ static void stl_sc26198sendbreak(stlport_t *portp, int len)
{ {
unsigned long flags; unsigned long flags;
#if DEBUG #ifdef DEBUG
printk("stl_sc26198sendbreak(portp=%x,len=%d)\n", (int) portp, len); printk("stl_sc26198sendbreak(portp=%x,len=%d)\n", (int) portp, len);
#endif #endif
...@@ -4787,7 +4766,7 @@ static void stl_sc26198flowctrl(stlport_t *portp, int state) ...@@ -4787,7 +4766,7 @@ static void stl_sc26198flowctrl(stlport_t *portp, int state)
unsigned long flags; unsigned long flags;
unsigned char mr0; unsigned char mr0;
#if DEBUG #ifdef DEBUG
printk("stl_sc26198flowctrl(portp=%x,state=%x)\n", (int) portp, state); printk("stl_sc26198flowctrl(portp=%x,state=%x)\n", (int) portp, state);
#endif #endif
...@@ -4859,7 +4838,7 @@ static void stl_sc26198sendflow(stlport_t *portp, int state) ...@@ -4859,7 +4838,7 @@ static void stl_sc26198sendflow(stlport_t *portp, int state)
unsigned long flags; unsigned long flags;
unsigned char mr0; unsigned char mr0;
#if DEBUG #ifdef DEBUG
printk("stl_sc26198sendflow(portp=%x,state=%x)\n", (int) portp, state); printk("stl_sc26198sendflow(portp=%x,state=%x)\n", (int) portp, state);
#endif #endif
...@@ -4899,7 +4878,7 @@ static void stl_sc26198flush(stlport_t *portp) ...@@ -4899,7 +4878,7 @@ static void stl_sc26198flush(stlport_t *portp)
{ {
unsigned long flags; unsigned long flags;
#if DEBUG #ifdef DEBUG
printk("stl_sc26198flush(portp=%x)\n", (int) portp); printk("stl_sc26198flush(portp=%x)\n", (int) portp);
#endif #endif
...@@ -4931,7 +4910,7 @@ static int stl_sc26198datastate(stlport_t *portp) ...@@ -4931,7 +4910,7 @@ static int stl_sc26198datastate(stlport_t *portp)
unsigned long flags; unsigned long flags;
unsigned char sr; unsigned char sr;
#if DEBUG #ifdef DEBUG
printk("stl_sc26198datastate(portp=%x)\n", (int) portp); printk("stl_sc26198datastate(portp=%x)\n", (int) portp);
#endif #endif
...@@ -4961,7 +4940,7 @@ static void stl_sc26198wait(stlport_t *portp) ...@@ -4961,7 +4940,7 @@ static void stl_sc26198wait(stlport_t *portp)
{ {
int i; int i;
#if DEBUG #ifdef DEBUG
printk("stl_sc26198wait(portp=%x)\n", (int) portp); printk("stl_sc26198wait(portp=%x)\n", (int) portp);
#endif #endif
...@@ -5039,7 +5018,7 @@ static void stl_sc26198txisr(stlport_t *portp) ...@@ -5039,7 +5018,7 @@ static void stl_sc26198txisr(stlport_t *portp)
int len, stlen; int len, stlen;
char *head, *tail; char *head, *tail;
#if DEBUG #ifdef DEBUG
printk("stl_sc26198txisr(portp=%x)\n", (int) portp); printk("stl_sc26198txisr(portp=%x)\n", (int) portp);
#endif #endif
...@@ -5100,7 +5079,7 @@ static void stl_sc26198rxisr(stlport_t *portp, unsigned int iack) ...@@ -5100,7 +5079,7 @@ static void stl_sc26198rxisr(stlport_t *portp, unsigned int iack)
struct tty_struct *tty; struct tty_struct *tty;
unsigned int len, buflen, ioaddr; unsigned int len, buflen, ioaddr;
#if DEBUG #ifdef DEBUG
printk("stl_sc26198rxisr(portp=%x,iack=%x)\n", (int) portp, iack); printk("stl_sc26198rxisr(portp=%x,iack=%x)\n", (int) portp, iack);
#endif #endif
...@@ -5256,7 +5235,7 @@ static void stl_sc26198otherisr(stlport_t *portp, unsigned int iack) ...@@ -5256,7 +5235,7 @@ static void stl_sc26198otherisr(stlport_t *portp, unsigned int iack)
{ {
unsigned char cir, ipr, xisr; unsigned char cir, ipr, xisr;
#if DEBUG #ifdef DEBUG
printk("stl_sc26198otherisr(portp=%x,iack=%x)\n", (int) portp, iack); printk("stl_sc26198otherisr(portp=%x,iack=%x)\n", (int) portp, iack);
#endif #endif
......
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