Commit 9e9fc313 authored by Jiri Slaby's avatar Jiri Slaby Committed by Linus Torvalds

Char: moxa, fix TIOC(G/S)SOFTCAR param

according to ioctl_list, both have int * as a param, not ulong *.
Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Tested-by: default avatarOyvind Aabling <Oyvind.Aabling@uni-c.dk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e46a5e3f
...@@ -741,9 +741,9 @@ static int moxa_ioctl(struct tty_struct *tty, struct file *file, ...@@ -741,9 +741,9 @@ static int moxa_ioctl(struct tty_struct *tty, struct file *file,
MoxaPortSendBreak(ch->port, arg); MoxaPortSendBreak(ch->port, arg);
return (0); return (0);
case TIOCGSOFTCAR: case TIOCGSOFTCAR:
return put_user(C_CLOCAL(tty) ? 1 : 0, (unsigned long __user *) argp); return put_user(C_CLOCAL(tty) ? 1 : 0, (int __user *)argp);
case TIOCSSOFTCAR: case TIOCSSOFTCAR:
if(get_user(retval, (unsigned long __user *) argp)) if (get_user(retval, (int __user *)argp))
return -EFAULT; return -EFAULT;
arg = retval; arg = retval;
tty->termios->c_cflag = ((tty->termios->c_cflag & ~CLOCAL) | tty->termios->c_cflag = ((tty->termios->c_cflag & ~CLOCAL) |
......
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