diff options
Diffstat (limited to 'drivers/nfc')
-rw-r--r-- | drivers/nfc/pn533.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c index 97c440a8cd61..f563cac02f31 100644 --- a/drivers/nfc/pn533.c +++ b/drivers/nfc/pn533.c | |||
@@ -84,6 +84,10 @@ MODULE_DEVICE_TABLE(usb, pn533_table); | |||
84 | #define PN533_LISTEN_TIME 2 | 84 | #define PN533_LISTEN_TIME 2 |
85 | 85 | ||
86 | /* frame definitions */ | 86 | /* frame definitions */ |
87 | #define PN533_NORMAL_FRAME_MAX_LEN 262 /* 6 (PREAMBLE, SOF, LEN, LCS, TFI) | ||
88 | 254 (DATA) | ||
89 | 2 (DCS, postamble) */ | ||
90 | |||
87 | #define PN533_FRAME_TAIL_SIZE 2 | 91 | #define PN533_FRAME_TAIL_SIZE 2 |
88 | #define PN533_FRAME_SIZE(f) (sizeof(struct pn533_frame) + f->datalen + \ | 92 | #define PN533_FRAME_SIZE(f) (sizeof(struct pn533_frame) + f->datalen + \ |
89 | PN533_FRAME_TAIL_SIZE) | 93 | PN533_FRAME_TAIL_SIZE) |
@@ -2373,9 +2377,9 @@ static int pn533_probe(struct usb_interface *interface, | |||
2373 | goto error; | 2377 | goto error; |
2374 | } | 2378 | } |
2375 | 2379 | ||
2376 | dev->in_frame = kmalloc(dev->in_maxlen, GFP_KERNEL); | 2380 | dev->in_frame = kmalloc(PN533_NORMAL_FRAME_MAX_LEN, GFP_KERNEL); |
2377 | dev->in_urb = usb_alloc_urb(0, GFP_KERNEL); | 2381 | dev->in_urb = usb_alloc_urb(0, GFP_KERNEL); |
2378 | dev->out_frame = kmalloc(dev->out_maxlen, GFP_KERNEL); | 2382 | dev->out_frame = kmalloc(PN533_NORMAL_FRAME_MAX_LEN, GFP_KERNEL); |
2379 | dev->out_urb = usb_alloc_urb(0, GFP_KERNEL); | 2383 | dev->out_urb = usb_alloc_urb(0, GFP_KERNEL); |
2380 | 2384 | ||
2381 | if (!dev->in_frame || !dev->out_frame || | 2385 | if (!dev->in_frame || !dev->out_frame || |