]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/irda/ircomm/ircomm_core.c
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[karo-tx-linux.git] / net / irda / ircomm / ircomm_core.c
index 6eef1f2a75535503f5c1562fb196bd56a3626c05..e97082017f4fabfd05ed2c3823f31c5e9fa1ee7e 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/init.h>
+#include <linux/slab.h>
 
 #include <net/irda/irda.h>
 #include <net/irda/irmod.h>
@@ -70,7 +71,7 @@ static int __init ircomm_init(void)
 {
        ircomm = hashbin_new(HB_LOCK);
        if (ircomm == NULL) {
-               IRDA_ERROR("%s(), can't allocate hashbin!\n", __FUNCTION__);
+               IRDA_ERROR("%s(), can't allocate hashbin!\n", __func__);
                return -ENOMEM;
        }
 
@@ -91,7 +92,7 @@ static int __init ircomm_init(void)
 
 static void __exit ircomm_cleanup(void)
 {
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        hashbin_delete(ircomm, (FREE_FUNC) __ircomm_close);
 
@@ -111,7 +112,7 @@ struct ircomm_cb *ircomm_open(notify_t *notify, __u8 service_type, int line)
        struct ircomm_cb *self = NULL;
        int ret;
 
-       IRDA_DEBUG(2, "%s(), service_type=0x%02x\n", __FUNCTION__ ,
+       IRDA_DEBUG(2, "%s(), service_type=0x%02x\n", __func__ ,
                   service_type);
 
        IRDA_ASSERT(ircomm != NULL, return NULL;);
@@ -155,7 +156,7 @@ EXPORT_SYMBOL(ircomm_open);
  */
 static int __ircomm_close(struct ircomm_cb *self)
 {
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        /* Disconnect link if any */
        ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL);
@@ -191,7 +192,7 @@ int ircomm_close(struct ircomm_cb *self)
        IRDA_ASSERT(self != NULL, return -EIO;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EIO;);
 
-       IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s()\n", __func__ );
 
        entry = hashbin_remove(ircomm, self->line, NULL);
 
@@ -216,7 +217,7 @@ int ircomm_connect_request(struct ircomm_cb *self, __u8 dlsap_sel,
        struct ircomm_info info;
        int ret;
 
-       IRDA_DEBUG(2 , "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2 , "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
@@ -245,7 +246,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb,
 {
        int clen = 0;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        /* Check if the packet contains data on the control channel */
        if (skb->len > 0)
@@ -261,7 +262,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb,
                                                info->qos, info->max_data_size,
                                                info->max_header_size, skb);
        else {
-               IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
        }
 }
 
@@ -278,7 +279,7 @@ int ircomm_connect_response(struct ircomm_cb *self, struct sk_buff *userdata)
        IRDA_ASSERT(self != NULL, return -1;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        ret = ircomm_do_event(self, IRCOMM_CONNECT_RESPONSE, userdata, NULL);
 
@@ -296,7 +297,7 @@ EXPORT_SYMBOL(ircomm_connect_response);
 void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb,
                            struct ircomm_info *info)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        if (self->notify.connect_confirm )
                self->notify.connect_confirm(self->notify.instance,
@@ -304,7 +305,7 @@ void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb,
                                             info->max_data_size,
                                             info->max_header_size, skb);
        else {
-               IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
        }
 }
 
@@ -318,7 +319,7 @@ int ircomm_data_request(struct ircomm_cb *self, struct sk_buff *skb)
 {
        int ret;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -EFAULT;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;);
@@ -339,14 +340,14 @@ EXPORT_SYMBOL(ircomm_data_request);
  */
 void ircomm_data_indication(struct ircomm_cb *self, struct sk_buff *skb)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(skb->len > 0, return;);
 
        if (self->notify.data_indication)
                self->notify.data_indication(self->notify.instance, self, skb);
        else {
-               IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
        }
 }
 
@@ -372,7 +373,7 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb)
         */
        if (unlikely(skb->len < (clen + 1))) {
                IRDA_DEBUG(2, "%s() throwing away illegal frame\n",
-                          __FUNCTION__ );
+                          __func__ );
                return;
        }
 
@@ -391,7 +392,7 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb)
                ircomm_data_indication(self, skb);
        else {
                IRDA_DEBUG(4, "%s(), data was control info only!\n",
-                          __FUNCTION__ );
+                          __func__ );
        }
 }
 
@@ -405,7 +406,7 @@ int ircomm_control_request(struct ircomm_cb *self, struct sk_buff *skb)
 {
        int ret;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -EFAULT;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;);
@@ -427,7 +428,7 @@ EXPORT_SYMBOL(ircomm_control_request);
 static void ircomm_control_indication(struct ircomm_cb *self,
                                      struct sk_buff *skb, int clen)
 {
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        /* Use udata for delivering data on the control channel */
        if (self->notify.udata_indication) {
@@ -448,7 +449,7 @@ static void ircomm_control_indication(struct ircomm_cb *self,
                 * see ircomm_tty_control_indication(). */
                dev_kfree_skb(ctrl_skb);
        } else {
-               IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
        }
 }
 
@@ -463,7 +464,7 @@ int ircomm_disconnect_request(struct ircomm_cb *self, struct sk_buff *userdata)
        struct ircomm_info info;
        int ret;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
@@ -484,7 +485,7 @@ EXPORT_SYMBOL(ircomm_disconnect_request);
 void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
                                  struct ircomm_info *info)
 {
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(info != NULL, return;);
 
@@ -492,7 +493,7 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
                self->notify.disconnect_indication(self->notify.instance, self,
                                                   info->reason, skb);
        } else {
-               IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
        }
 }
 
@@ -504,7 +505,7 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
  */
 void ircomm_flow_request(struct ircomm_cb *self, LOCAL_FLOW flow)
 {
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);