]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Char: moxa, fix TIOC(G/S)SOFTCAR param
authorJiri Slaby <jirislaby@gmail.com>
Wed, 30 Apr 2008 07:53:38 +0000 (00:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Apr 2008 15:29:42 +0000 (08:29 -0700)
according to ioctl_list, both have int * as a param, not ulong *.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Tested-by: Oyvind Aabling <Oyvind.Aabling@uni-c.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/moxa.c

index f841b1f74bfc995401212bcb478b4b9749f83b5f..428c1380b7717ddb8571dda83b9e9fb4ac763c50 100644 (file)
@@ -741,9 +741,9 @@ static int moxa_ioctl(struct tty_struct *tty, struct file *file,
                MoxaPortSendBreak(ch->port, arg);
                return (0);
        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:
-               if(get_user(retval, (unsigned long __user *) argp))
+               if (get_user(retval, (int __user *)argp))
                        return -EFAULT;
                arg = retval;
                tty->termios->c_cflag = ((tty->termios->c_cflag & ~CLOCAL) |