linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / net / irda / af_irda.c
index 17699ee..7594456 100644 (file)
@@ -42,6 +42,7 @@
  *
  ********************************************************************/
 
+#include <linux/config.h>
 #include <linux/capability.h>
 #include <linux/module.h>
 #include <linux/types.h>
@@ -308,7 +309,7 @@ static void irda_connect_response(struct irda_sock *self)
 
        IRDA_ASSERT(self != NULL, return;);
 
-       skb = alloc_skb(64, GFP_ATOMIC);
+       skb = dev_alloc_skb(64);
        if (skb == NULL) {
                IRDA_DEBUG(0, "%s() Unable to allocate sk_buff!\n",
                           __FUNCTION__);
@@ -1301,7 +1302,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
        if (sk->sk_state != TCP_ESTABLISHED)
                return -ENOTCONN;
 
-       /* Check that we don't send out too big frames */
+       /* Check that we don't send out to big frames */
        if (len > self->max_data_size) {
                IRDA_DEBUG(2, "%s(), Chopping frame from %zd to %d bytes!\n",
                           __FUNCTION__, len, self->max_data_size);
@@ -1545,7 +1546,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
        IRDA_ASSERT(self != NULL, return -1;);
 
        /*
-        * Check that we don't send out too big frames. This is an unreliable
+        * Check that we don't send out to big frames. This is an unreliable
         * service, so we have no fragmentation and no coalescence
         */
        if (len > self->max_data_size) {
@@ -1641,7 +1642,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
        }
 
        /*
-        * Check that we don't send out too big frames. This is an unreliable
+        * Check that we don't send out to big frames. This is an unreliable
         * service, so we have no fragmentation and no coalescence
         */
        if (len > self->max_data_size) {
@@ -1829,19 +1830,6 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
        return 0;
 }
 
-#ifdef CONFIG_COMPAT
-/*
- * Function irda_ioctl (sock, cmd, arg)
- */
-static int irda_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
-{
-       /*
-        * All IRDA's ioctl are standard ones.
-        */
-       return -ENOIOCTLCMD;
-}
-#endif
-
 /*
  * Function irda_setsockopt (sock, level, optname, optval, optlen)
  *
@@ -2488,9 +2476,6 @@ static const struct proto_ops SOCKOPS_WRAPPED(irda_stream_ops) = {
        .getname =      irda_getname,
        .poll =         irda_poll,
        .ioctl =        irda_ioctl,
-#ifdef CONFIG_COMPAT
-       .compat_ioctl = irda_compat_ioctl,
-#endif
        .listen =       irda_listen,
        .shutdown =     irda_shutdown,
        .setsockopt =   irda_setsockopt,
@@ -2512,9 +2497,6 @@ static const struct proto_ops SOCKOPS_WRAPPED(irda_seqpacket_ops) = {
        .getname =      irda_getname,
        .poll =         datagram_poll,
        .ioctl =        irda_ioctl,
-#ifdef CONFIG_COMPAT
-       .compat_ioctl = irda_compat_ioctl,
-#endif
        .listen =       irda_listen,
        .shutdown =     irda_shutdown,
        .setsockopt =   irda_setsockopt,
@@ -2536,9 +2518,6 @@ static const struct proto_ops SOCKOPS_WRAPPED(irda_dgram_ops) = {
        .getname =      irda_getname,
        .poll =         datagram_poll,
        .ioctl =        irda_ioctl,
-#ifdef CONFIG_COMPAT
-       .compat_ioctl = irda_compat_ioctl,
-#endif
        .listen =       irda_listen,
        .shutdown =     irda_shutdown,
        .setsockopt =   irda_setsockopt,
@@ -2561,9 +2540,6 @@ static const struct proto_ops SOCKOPS_WRAPPED(irda_ultra_ops) = {
        .getname =      irda_getname,
        .poll =         datagram_poll,
        .ioctl =        irda_ioctl,
-#ifdef CONFIG_COMPAT
-       .compat_ioctl = irda_compat_ioctl,
-#endif
        .listen =       sock_no_listen,
        .shutdown =     irda_shutdown,
        .setsockopt =   irda_setsockopt,