[SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}
[safe/jmp/linux-2.6] / drivers / net / irda / mcs7780.c
index 3ff1f4b..4b0037e 100644 (file)
@@ -353,7 +353,7 @@ static unsigned mcs_wrap_fir_skb(const struct sk_buff *skb, __u8 *buf)
        buf[0] = len & 0xff;
        buf[1] = (len >> 8) & 0xff;
        /* copy the data into the tx buffer. */
-       memcpy(buf+2, skb->data, skb->len);
+       skb_copy_from_linear_data(skb, buf + 2, skb->len);
        /* put the fcs in the last four bytes in little endian order. */
        buf[len - 4] = fcs & 0xff;
        buf[len - 3] = (fcs >> 8) & 0xff;
@@ -377,7 +377,7 @@ static unsigned mcs_wrap_mir_skb(const struct sk_buff *skb, __u8 *buf)
        buf[0] = len & 0xff;
        buf[1] = (len >> 8) & 0xff;
        /* copy the data */
-       memcpy(buf+2, skb->data, skb->len);
+       skb_copy_from_linear_data(skb, buf + 2, skb->len);
        /* put the fcs in last two bytes in little endian order. */
        buf[len - 2] = fcs & 0xff;
        buf[len - 1] = (fcs >> 8) & 0xff;