diff options
author | Arnaldo Carvalho de Melo <acme@ghostprotocols.net> | 2007-03-31 10:55:19 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:28:29 -0400 |
commit | 27d7ff46a3498d3debc6ba68fb8014c702b81170 (patch) | |
tree | b5a0c617cf8339524d3b1f1633e08eae7b94cf86 /drivers/net/irda/w83977af_ir.c | |
parent | 3dbad80ac7632f243b824d469301abb97ec634a1 (diff) |
[SK_BUFF]: Introduce skb_copy_to_linear_data{_offset}
To clearly state the intent of copying to linear sk_buffs, _offset being a
overly long variant but interesting for the sake of saving some bytes.
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Diffstat (limited to 'drivers/net/irda/w83977af_ir.c')
-rw-r--r-- | drivers/net/irda/w83977af_ir.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c index 0d4a68618fc1..5182e800cc18 100644 --- a/drivers/net/irda/w83977af_ir.c +++ b/drivers/net/irda/w83977af_ir.c | |||
@@ -908,10 +908,14 @@ int w83977af_dma_receive_complete(struct w83977af_ir *self) | |||
908 | /* Copy frame without CRC */ | 908 | /* Copy frame without CRC */ |
909 | if (self->io.speed < 4000000) { | 909 | if (self->io.speed < 4000000) { |
910 | skb_put(skb, len-2); | 910 | skb_put(skb, len-2); |
911 | memcpy(skb->data, self->rx_buff.data, len-2); | 911 | skb_copy_to_linear_data(skb, |
912 | self->rx_buff.data, | ||
913 | len - 2); | ||
912 | } else { | 914 | } else { |
913 | skb_put(skb, len-4); | 915 | skb_put(skb, len-4); |
914 | memcpy(skb->data, self->rx_buff.data, len-4); | 916 | skb_copy_to_linear_data(skb, |
917 | self->rx_buff.data, | ||
918 | len - 4); | ||
915 | } | 919 | } |
916 | 920 | ||
917 | /* Move to next frame */ | 921 | /* Move to next frame */ |