This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / net / irda / af_irda.c
index 9e56f71..6d6c65a 100644 (file)
@@ -1797,7 +1797,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
 
        case SIOCGSTAMP:
                if (sk != NULL)
-                       return sock_get_timestamp(sk, (struct timeval *)arg);
+                       return sock_get_timestamp(sk, (struct timeval __user *)arg);
                return -EINVAL;
 
        case SIOCGIFADDR:
@@ -1813,7 +1813,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
                return -EINVAL;
        default:
                IRDA_DEBUG(1, "%s(), doing device ioctl!\n", __FUNCTION__);
-               return dev_ioctl(cmd, (void *) arg);
+               return dev_ioctl(cmd, (void __user *) arg);
        }
 
        /*NOTREACHED*/
@@ -1827,7 +1827,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
  *
  */
 static int irda_setsockopt(struct socket *sock, int level, int optname,
-                          char *optval, int optlen)
+                          char __user *optval, int optlen)
 {
        struct sock *sk = sock->sk;
        struct irda_sock *self = irda_sk(sk);
@@ -1860,7 +1860,7 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
                        return -ENOMEM;
 
                /* Copy query to the driver. */
-               if (copy_from_user(ias_opt, (char *)optval, optlen)) {
+               if (copy_from_user(ias_opt, optval, optlen)) {
                        kfree(ias_opt);
                        return -EFAULT;
                }
@@ -1962,7 +1962,7 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
                        return -ENOMEM;
 
                /* Copy query to the driver. */
-               if (copy_from_user(ias_opt, (char *)optval, optlen)) {
+               if (copy_from_user(ias_opt, optval, optlen)) {
                        kfree(ias_opt);
                        return -EFAULT;
                }
@@ -2012,7 +2012,7 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
                if (optlen < sizeof(int))
                        return -EINVAL;
 
-               if (get_user(opt, (int *)optval))
+               if (get_user(opt, (int __user *)optval))
                        return -EFAULT;
 
                /* Only possible for a seqpacket service (TTP with SAR) */
@@ -2031,7 +2031,7 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
                        return -EINVAL;
 
                /* The input is really a (__u8 hints[2]), easier as an int */
-               if (get_user(opt, (int *)optval))
+               if (get_user(opt, (int __user *)optval))
                        return -EFAULT;
 
                /* Unregister any old registration */
@@ -2050,7 +2050,7 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
                        return -EINVAL;
 
                /* The input is really a (__u8 hints[2]), easier as an int */
-               if (get_user(opt, (int *)optval))
+               if (get_user(opt, (int __user *)optval))
                        return -EFAULT;
 
                /* Set the new hint mask */
@@ -2121,7 +2121,7 @@ static int irda_extract_ias_value(struct irda_ias_set *ias_opt,
  * Function irda_getsockopt (sock, level, optname, optval, optlen)
  */
 static int irda_getsockopt(struct socket *sock, int level, int optname,
-                          char *optval, int *optlen)
+                          char __user *optval, int __user *optlen)
 {
        struct sock *sk = sock->sk;
        struct irda_sock *self = irda_sk(sk);
@@ -2211,7 +2211,7 @@ bed:
                        return -ENOMEM;
 
                /* Copy query to the driver. */
-               if (copy_from_user((char *) ias_opt, (char *)optval, len)) {
+               if (copy_from_user(ias_opt, optval, len)) {
                        kfree(ias_opt);
                        return -EFAULT;
                }
@@ -2245,7 +2245,7 @@ bed:
                }
 
                /* Copy reply to the user */
-               if (copy_to_user((char *)optval, (char *) ias_opt,
+               if (copy_to_user(optval, ias_opt,
                                 sizeof(struct irda_ias_set))) {
                        kfree(ias_opt);
                        return -EFAULT;
@@ -2267,7 +2267,7 @@ bed:
                        return -ENOMEM;
 
                /* Copy query to the driver. */
-               if (copy_from_user((char *) ias_opt, (char *)optval, len)) {
+               if (copy_from_user(ias_opt, optval, len)) {
                        kfree(ias_opt);
                        return -EFAULT;
                }
@@ -2351,7 +2351,7 @@ bed:
                }
 
                /* Copy reply to the user */
-               if (copy_to_user((char *)optval, (char *) ias_opt,
+               if (copy_to_user(optval, ias_opt,
                                 sizeof(struct irda_ias_set))) {
                        kfree(ias_opt);
                        return -EFAULT;
@@ -2378,7 +2378,7 @@ bed:
                if (len != sizeof(int))
                        return -EINVAL;
                /* Get timeout in ms (max time we block the caller) */
-               if (get_user(val, (int *)optval))
+               if (get_user(val, (int __user *)optval))
                        return -EFAULT;
 
                /* Tell IrLMP we want to be notified */
@@ -2438,7 +2438,7 @@ bed:
                 * If the user want more details, he should query
                 * the whole discovery log and pick one device...
                 */
-               if (put_user(daddr, (int *)optval))
+               if (put_user(daddr, (int __user *)optval))
                        return -EFAULT;
 
                break;