Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[cascardo/linux.git] / drivers / isdn / pcbit / capi.c
index bef321d..ac5a91c 100644 (file)
@@ -15,9 +15,9 @@
 
 /*
  *        Documentation:
- *        - "Common ISDN API - Perfil Português - Versão 2.1",
+ *        - "Common ISDN API - Perfil Português - Versão 2.1",
  *           Telecom Portugal, Fev 1992.
- *        - "Common ISDN API - Especificação de protocolos para 
+ *        - "Common ISDN API - Especificação de protocolos para
  *           acesso aos canais B", Inesc, Jan 1994.
  */
 
@@ -27,7 +27,6 @@
  *              encode our number in CallerPN and ConnectedPN
  */
 
-#include <linux/sched.h>
 #include <linux/string.h>
 #include <linux/kernel.h>
 
@@ -430,8 +429,9 @@ int capi_decode_conn_ind(struct pcbit_chan * chan,
                if (!(info->data.setup.CallingPN = kmalloc(len - count + 1, GFP_ATOMIC)))
                        return -1;
        
-               memcpy(info->data.setup.CallingPN, skb->data + count + 1, 
-                      len - count);
+               skb_copy_from_linear_data_offset(skb, count + 1,
+                                                info->data.setup.CallingPN,
+                                                len - count);
                info->data.setup.CallingPN[len - count] = 0;
 
        }
@@ -458,8 +458,9 @@ int capi_decode_conn_ind(struct pcbit_chan * chan,
                if (!(info->data.setup.CalledPN = kmalloc(len - count + 1, GFP_ATOMIC)))
                        return -1;
         
-               memcpy(info->data.setup.CalledPN, skb->data + count + 1, 
-                      len - count); 
+               skb_copy_from_linear_data_offset(skb, count + 1,
+                                                info->data.setup.CalledPN,
+                                                len - count);
                info->data.setup.CalledPN[len - count] = 0;
 
        }
@@ -540,7 +541,7 @@ int capi_decode_conn_actv_ind(struct pcbit_chan * chan, struct sk_buff *skb)
 
 #ifdef DEBUG
        if (len > 1 && len < 31) {
-               memcpy(str, skb->data + 2, len - 1);
+               skb_copy_from_linear_data_offset(skb, 2, str, len - 1);
                str[len] = 0;
                printk(KERN_DEBUG "Connected Party Number: %s\n", str);
        }