diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-27 17:55:52 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:28:23 -0400 |
commit | d626f62b11e00c16e81e4308ab93d3f13551812a (patch) | |
tree | fac4af6ced853755e12fc709d55f0c2bec51265d /drivers/bluetooth/bpa10x.c | |
parent | 2a123b86e2b242a4a6db990d2851d45e192f88e5 (diff) |
[SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}
To clearly state the intent of copying from 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@redhat.com>
Diffstat (limited to 'drivers/bluetooth/bpa10x.c')
-rw-r--r-- | drivers/bluetooth/bpa10x.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c index 9fca6513562d..e8ebd5d3de86 100644 --- a/drivers/bluetooth/bpa10x.c +++ b/drivers/bluetooth/bpa10x.c | |||
@@ -231,7 +231,7 @@ static void bpa10x_wakeup(struct bpa10x_data *data) | |||
231 | cr = (struct usb_ctrlrequest *) urb->setup_packet; | 231 | cr = (struct usb_ctrlrequest *) urb->setup_packet; |
232 | cr->wLength = __cpu_to_le16(skb->len); | 232 | cr->wLength = __cpu_to_le16(skb->len); |
233 | 233 | ||
234 | memcpy(urb->transfer_buffer, skb->data, skb->len); | 234 | skb_copy_from_linear_data(skb, urb->transfer_buffer, skb->len); |
235 | urb->transfer_buffer_length = skb->len; | 235 | urb->transfer_buffer_length = skb->len; |
236 | 236 | ||
237 | err = usb_submit_urb(urb, GFP_ATOMIC); | 237 | err = usb_submit_urb(urb, GFP_ATOMIC); |
@@ -250,7 +250,7 @@ static void bpa10x_wakeup(struct bpa10x_data *data) | |||
250 | skb = skb_dequeue(&data->tx_queue); | 250 | skb = skb_dequeue(&data->tx_queue); |
251 | 251 | ||
252 | if (skb) { | 252 | if (skb) { |
253 | memcpy(urb->transfer_buffer, skb->data, skb->len); | 253 | skb_copy_from_linear_data(skb, urb->transfer_buffer, skb->len); |
254 | urb->transfer_buffer_length = skb->len; | 254 | urb->transfer_buffer_length = skb->len; |
255 | 255 | ||
256 | err = usb_submit_urb(urb, GFP_ATOMIC); | 256 | err = usb_submit_urb(urb, GFP_ATOMIC); |