patch-2.1.14 linux/drivers/char/riscom8.c
Next file: linux/drivers/char/serial.c
Previous file: linux/drivers/char/pcxx.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Sat Nov 30 10:48:33 1996
- Orig file:
v2.1.13/linux/drivers/char/riscom8.c
- Orig date:
Tue Nov 19 15:53:54 1996
diff -u --recursive --new-file v2.1.13/linux/drivers/char/riscom8.c linux/drivers/char/riscom8.c
@@ -1356,7 +1356,7 @@
| ((status & MSVR_CD) ? TIOCM_CAR : 0)
| ((status & MSVR_DSR) ? TIOCM_DSR : 0)
| ((status & MSVR_CTS) ? TIOCM_CTS : 0);
- put_user(result,(unsigned long *) value);
+ put_user(result, value);
return 0;
}
@@ -1368,10 +1368,9 @@
unsigned long flags;
struct riscom_board *bp = port_Board(port);
- error = verify_area(VERIFY_READ, value, sizeof(int));
+ error = get_user(arg, value);
if (error)
return error;
- get_user(arg,(unsigned int *) value);
switch (cmd) {
case TIOCMBIS:
if (arg & TIOCM_RTS)
@@ -1523,14 +1522,11 @@
rc_send_break(port, arg ? arg*(HZ/10) : HZ/4);
return 0;
case TIOCGSOFTCAR:
- error = verify_area(VERIFY_WRITE, (void *) arg, sizeof(long));
- if (error)
- return error;
- put_user(C_CLOCAL(tty) ? 1 : 0,
- (unsigned long *) arg);
- return 0;
+ return put_user(C_CLOCAL(tty) ? 1 : 0, (unsigned int *) arg);
case TIOCSSOFTCAR:
- get_user(arg,(unsigned int *) arg);
+ retval = get_user(arg,(unsigned int *) arg);
+ if (retval)
+ return retval;
tty->termios->c_cflag =
((tty->termios->c_cflag & ~CLOCAL) |
(arg ? CLOCAL : 0));
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov