aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-27 17:55:52 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:28:23 -0400
commitd626f62b11e00c16e81e4308ab93d3f13551812a (patch)
treefac4af6ced853755e12fc709d55f0c2bec51265d /drivers/bluetooth
parent2a123b86e2b242a4a6db990d2851d45e192f88e5 (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')
-rw-r--r--drivers/bluetooth/bfusb.c2
-rw-r--r--drivers/bluetooth/bpa10x.c4
-rw-r--r--drivers/bluetooth/dtl1_cs.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c
index 4c766f36d884..b990805806af 100644
--- a/drivers/bluetooth/bfusb.c
+++ b/drivers/bluetooth/bfusb.c
@@ -527,7 +527,7 @@ static int bfusb_send_frame(struct sk_buff *skb)
527 buf[2] = (size == BFUSB_MAX_BLOCK_SIZE) ? 0 : size; 527 buf[2] = (size == BFUSB_MAX_BLOCK_SIZE) ? 0 : size;
528 528
529 memcpy(skb_put(nskb, 3), buf, 3); 529 memcpy(skb_put(nskb, 3), buf, 3);
530 memcpy(skb_put(nskb, size), skb->data + sent, size); 530 skb_copy_from_linear_data_offset(skb, sent, skb_put(nskb, size), size);
531 531
532 sent += size; 532 sent += size;
533 count -= size; 533 count -= size;
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);
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c
index 459aa97937ab..7f9c54b9964a 100644
--- a/drivers/bluetooth/dtl1_cs.c
+++ b/drivers/bluetooth/dtl1_cs.c
@@ -425,7 +425,7 @@ static int dtl1_hci_send_frame(struct sk_buff *skb)
425 return -ENOMEM; 425 return -ENOMEM;
426 426
427 skb_reserve(s, NSHL); 427 skb_reserve(s, NSHL);
428 memcpy(skb_put(s, skb->len), skb->data, skb->len); 428 skb_copy_from_linear_data(skb, skb_put(s, skb->len), skb->len);
429 if (skb->len & 0x0001) 429 if (skb->len & 0x0001)
430 *skb_put(s, 1) = 0; /* PAD */ 430 *skb_put(s, 1) = 0; /* PAD */
431 431