Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351880
b: refs/heads/master
c: d22b2db
h: refs/heads/master
v: v3
  • Loading branch information
Waldemar Rymarkiewicz authored and Samuel Ortiz committed Jan 9, 2013
1 parent af74db8 commit 9681249
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 94c5c1561dde894766b1a9135e47b056fdbe13a4
refs/heads/master: d22b2db69035ae3b8f71a58dfe0bd10ae1ee58d5
22 changes: 16 additions & 6 deletions trunk/drivers/nfc/pn533.c
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,20 @@ static void pn533_send_complete(struct urb *urb)
}
}

static struct sk_buff *pn533_alloc_skb(unsigned int size)
{
struct sk_buff *skb;

skb = alloc_skb(PN533_FRAME_HEADER_LEN +
size +
PN533_FRAME_TAIL_LEN, GFP_KERNEL);

if (skb)
skb_reserve(skb, PN533_FRAME_HEADER_LEN);

return skb;
}

struct pn533_target_type_a {
__be16 sens_res;
u8 sel_res;
Expand Down Expand Up @@ -2390,15 +2404,11 @@ static void pn533_wq_mi_recv(struct work_struct *work)
nfc_dev_dbg(&dev->interface->dev, "%s", __func__);

/* This is a zero payload size skb */
skb_cmd = alloc_skb(PN533_FRAME_HEADER_LEN +
PN533_CMD_DATAEXCH_HEAD_LEN +
PN533_FRAME_TAIL_LEN,
GFP_KERNEL);
skb_cmd = pn533_alloc_skb(PN533_CMD_DATAEXCH_HEAD_LEN);
if (skb_cmd == NULL)
goto error_cmd;

skb_reserve(skb_cmd,
PN533_FRAME_HEADER_LEN + PN533_CMD_DATAEXCH_HEAD_LEN);
skb_reserve(skb_cmd, PN533_CMD_DATAEXCH_HEAD_LEN);

rc = pn533_build_tx_frame(dev, skb_cmd, true);
if (rc)
Expand Down

0 comments on commit 9681249

Please sign in to comment.