diff options
author | Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> | 2012-11-26 08:18:30 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-01-09 18:44:25 -0500 |
commit | 8d25ca799783788742bc7d9647eec44b6754766e (patch) | |
tree | 39d7bd8b0968c5272a4651505af594f322b564d8 /drivers/nfc | |
parent | 2c2d45bdcb7063ef58dc2c27d72026c394a8f584 (diff) |
NFC: pn533: Remove in/out_maxlen as it is not used
in_maxlen and out_maxlen was replaced with PN533_NORMAL_FRAME_MAX_LEN
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r-- | drivers/nfc/pn533.c | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c index ada681b01a17..cf94113b174a 100644 --- a/drivers/nfc/pn533.c +++ b/drivers/nfc/pn533.c | |||
@@ -349,11 +349,9 @@ struct pn533 { | |||
349 | struct nfc_dev *nfc_dev; | 349 | struct nfc_dev *nfc_dev; |
350 | 350 | ||
351 | struct urb *out_urb; | 351 | struct urb *out_urb; |
352 | int out_maxlen; | ||
353 | struct pn533_frame *out_frame; | 352 | struct pn533_frame *out_frame; |
354 | 353 | ||
355 | struct urb *in_urb; | 354 | struct urb *in_urb; |
356 | int in_maxlen; | ||
357 | struct pn533_frame *in_frame; | 355 | struct pn533_frame *in_frame; |
358 | 356 | ||
359 | struct sk_buff_head resp_q; | 357 | struct sk_buff_head resp_q; |
@@ -1454,8 +1452,9 @@ static int pn533_send_poll_frame(struct pn533 *dev) | |||
1454 | pn533_build_poll_frame(dev, dev->out_frame, cur_mod); | 1452 | pn533_build_poll_frame(dev, dev->out_frame, cur_mod); |
1455 | 1453 | ||
1456 | rc = pn533_send_cmd_frame_async(dev, dev->out_frame, dev->in_frame, | 1454 | rc = pn533_send_cmd_frame_async(dev, dev->out_frame, dev->in_frame, |
1457 | dev->in_maxlen, pn533_poll_complete, | 1455 | PN533_NORMAL_FRAME_MAX_LEN, |
1458 | NULL, GFP_KERNEL); | 1456 | pn533_poll_complete, |
1457 | NULL, GFP_KERNEL); | ||
1459 | if (rc) | 1458 | if (rc) |
1460 | nfc_dev_err(&dev->interface->dev, "Polling loop error %d", rc); | 1459 | nfc_dev_err(&dev->interface->dev, "Polling loop error %d", rc); |
1461 | 1460 | ||
@@ -1567,7 +1566,7 @@ static int pn533_activate_target_nfcdep(struct pn533 *dev) | |||
1567 | pn533_tx_frame_finish(dev->out_frame); | 1566 | pn533_tx_frame_finish(dev->out_frame); |
1568 | 1567 | ||
1569 | rc = pn533_send_cmd_frame_sync(dev, dev->out_frame, dev->in_frame, | 1568 | rc = pn533_send_cmd_frame_sync(dev, dev->out_frame, dev->in_frame, |
1570 | dev->in_maxlen); | 1569 | PN533_NORMAL_FRAME_MAX_LEN); |
1571 | if (rc) | 1570 | if (rc) |
1572 | return rc; | 1571 | return rc; |
1573 | 1572 | ||
@@ -1661,7 +1660,7 @@ static void pn533_deactivate_target(struct nfc_dev *nfc_dev, | |||
1661 | pn533_tx_frame_finish(dev->out_frame); | 1660 | pn533_tx_frame_finish(dev->out_frame); |
1662 | 1661 | ||
1663 | rc = pn533_send_cmd_frame_sync(dev, dev->out_frame, dev->in_frame, | 1662 | rc = pn533_send_cmd_frame_sync(dev, dev->out_frame, dev->in_frame, |
1664 | dev->in_maxlen); | 1663 | PN533_NORMAL_FRAME_MAX_LEN); |
1665 | if (rc) { | 1664 | if (rc) { |
1666 | nfc_dev_err(&dev->interface->dev, "Error when sending release" | 1665 | nfc_dev_err(&dev->interface->dev, "Error when sending release" |
1667 | " command to the controller"); | 1666 | " command to the controller"); |
@@ -1822,8 +1821,9 @@ static int pn533_dep_link_up(struct nfc_dev *nfc_dev, struct nfc_target *target, | |||
1822 | pn533_tx_frame_finish(dev->out_frame); | 1821 | pn533_tx_frame_finish(dev->out_frame); |
1823 | 1822 | ||
1824 | rc = pn533_send_cmd_frame_async(dev, dev->out_frame, dev->in_frame, | 1823 | rc = pn533_send_cmd_frame_async(dev, dev->out_frame, dev->in_frame, |
1825 | dev->in_maxlen, pn533_in_dep_link_up_complete, | 1824 | PN533_NORMAL_FRAME_MAX_LEN, |
1826 | cmd, GFP_KERNEL); | 1825 | pn533_in_dep_link_up_complete, cmd, |
1826 | GFP_KERNEL); | ||
1827 | if (rc < 0) | 1827 | if (rc < 0) |
1828 | kfree(cmd); | 1828 | kfree(cmd); |
1829 | 1829 | ||
@@ -2121,8 +2121,9 @@ static int pn533_tm_send(struct nfc_dev *nfc_dev, struct sk_buff *skb) | |||
2121 | out_frame = (struct pn533_frame *) skb->data; | 2121 | out_frame = (struct pn533_frame *) skb->data; |
2122 | 2122 | ||
2123 | rc = pn533_send_cmd_frame_async(dev, out_frame, dev->in_frame, | 2123 | rc = pn533_send_cmd_frame_async(dev, out_frame, dev->in_frame, |
2124 | dev->in_maxlen, pn533_tm_send_complete, | 2124 | PN533_NORMAL_FRAME_MAX_LEN, |
2125 | skb, GFP_KERNEL); | 2125 | pn533_tm_send_complete, skb, |
2126 | GFP_KERNEL); | ||
2126 | if (rc) { | 2127 | if (rc) { |
2127 | nfc_dev_err(&dev->interface->dev, | 2128 | nfc_dev_err(&dev->interface->dev, |
2128 | "Error %d when trying to send data", rc); | 2129 | "Error %d when trying to send data", rc); |
@@ -2217,7 +2218,7 @@ static int pn533_set_configuration(struct pn533 *dev, u8 cfgitem, u8 *cfgdata, | |||
2217 | pn533_tx_frame_finish(dev->out_frame); | 2218 | pn533_tx_frame_finish(dev->out_frame); |
2218 | 2219 | ||
2219 | rc = pn533_send_cmd_frame_sync(dev, dev->out_frame, dev->in_frame, | 2220 | rc = pn533_send_cmd_frame_sync(dev, dev->out_frame, dev->in_frame, |
2220 | dev->in_maxlen); | 2221 | PN533_NORMAL_FRAME_MAX_LEN); |
2221 | 2222 | ||
2222 | return rc; | 2223 | return rc; |
2223 | } | 2224 | } |
@@ -2238,7 +2239,7 @@ static int pn533_fw_reset(struct pn533 *dev) | |||
2238 | pn533_tx_frame_finish(dev->out_frame); | 2239 | pn533_tx_frame_finish(dev->out_frame); |
2239 | 2240 | ||
2240 | rc = pn533_send_cmd_frame_sync(dev, dev->out_frame, dev->in_frame, | 2241 | rc = pn533_send_cmd_frame_sync(dev, dev->out_frame, dev->in_frame, |
2241 | dev->in_maxlen); | 2242 | PN533_NORMAL_FRAME_MAX_LEN); |
2242 | 2243 | ||
2243 | return rc; | 2244 | return rc; |
2244 | } | 2245 | } |
@@ -2359,16 +2360,11 @@ static int pn533_probe(struct usb_interface *interface, | |||
2359 | for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) { | 2360 | for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) { |
2360 | endpoint = &iface_desc->endpoint[i].desc; | 2361 | endpoint = &iface_desc->endpoint[i].desc; |
2361 | 2362 | ||
2362 | if (!in_endpoint && usb_endpoint_is_bulk_in(endpoint)) { | 2363 | if (!in_endpoint && usb_endpoint_is_bulk_in(endpoint)) |
2363 | dev->in_maxlen = le16_to_cpu(endpoint->wMaxPacketSize); | ||
2364 | in_endpoint = endpoint->bEndpointAddress; | 2364 | in_endpoint = endpoint->bEndpointAddress; |
2365 | } | ||
2366 | 2365 | ||
2367 | if (!out_endpoint && usb_endpoint_is_bulk_out(endpoint)) { | 2366 | if (!out_endpoint && usb_endpoint_is_bulk_out(endpoint)) |
2368 | dev->out_maxlen = | ||
2369 | le16_to_cpu(endpoint->wMaxPacketSize); | ||
2370 | out_endpoint = endpoint->bEndpointAddress; | 2367 | out_endpoint = endpoint->bEndpointAddress; |
2371 | } | ||
2372 | } | 2368 | } |
2373 | 2369 | ||
2374 | if (!in_endpoint || !out_endpoint) { | 2370 | if (!in_endpoint || !out_endpoint) { |
@@ -2418,7 +2414,7 @@ static int pn533_probe(struct usb_interface *interface, | |||
2418 | pn533_tx_frame_finish(dev->out_frame); | 2414 | pn533_tx_frame_finish(dev->out_frame); |
2419 | 2415 | ||
2420 | rc = pn533_send_cmd_frame_sync(dev, dev->out_frame, dev->in_frame, | 2416 | rc = pn533_send_cmd_frame_sync(dev, dev->out_frame, dev->in_frame, |
2421 | dev->in_maxlen); | 2417 | PN533_NORMAL_FRAME_MAX_LEN); |
2422 | if (rc) | 2418 | if (rc) |
2423 | goto destroy_wq; | 2419 | goto destroy_wq; |
2424 | 2420 | ||