aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc/pn533.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-04-05 15:27:37 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2013-09-24 19:35:39 -0400
commitb48348395ff665f49c7c684c93c5ce09fd0a0307 (patch)
tree73a27a2efd2a6b778a0aacb0764368ec621b6a22 /drivers/nfc/pn533.c
parent3943826177945c0f7e82fcf1f37797149c6d9c91 (diff)
NFC: Replace nfc_dev_dbg with dev_dbg
Use the generic kernel function instead of a home-grown one that does the same thing. Add \n to uses not at the macro. Don't add \n where the nfc_dev_dbg macro mistakenly had them already. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc/pn533.c')
-rw-r--r--drivers/nfc/pn533.c137
1 files changed, 62 insertions, 75 deletions
diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c
index 5df730be88a3..e64bea53f0c8 100644
--- a/drivers/nfc/pn533.c
+++ b/drivers/nfc/pn533.c
@@ -722,9 +722,9 @@ static void pn533_recv_response(struct urb *urb)
722 break; /* success */ 722 break; /* success */
723 case -ECONNRESET: 723 case -ECONNRESET:
724 case -ENOENT: 724 case -ENOENT:
725 nfc_dev_dbg(&dev->interface->dev, 725 dev_dbg(&dev->interface->dev,
726 "The urb has been canceled (status %d)", 726 "The urb has been canceled (status %d)\n",
727 urb->status); 727 urb->status);
728 goto sched_wq; 728 goto sched_wq;
729 case -ESHUTDOWN: 729 case -ESHUTDOWN:
730 default: 730 default:
@@ -735,7 +735,7 @@ static void pn533_recv_response(struct urb *urb)
735 735
736 in_frame = dev->in_urb->transfer_buffer; 736 in_frame = dev->in_urb->transfer_buffer;
737 737
738 nfc_dev_dbg(&dev->interface->dev, "Received a frame."); 738 dev_dbg(&dev->interface->dev, "Received a frame\n");
739 print_hex_dump_debug("PN533 RX: ", DUMP_PREFIX_NONE, 16, 1, in_frame, 739 print_hex_dump_debug("PN533 RX: ", DUMP_PREFIX_NONE, 16, 1, in_frame,
740 dev->ops->rx_frame_size(in_frame), false); 740 dev->ops->rx_frame_size(in_frame), false);
741 741
@@ -777,9 +777,9 @@ static void pn533_recv_ack(struct urb *urb)
777 break; /* success */ 777 break; /* success */
778 case -ECONNRESET: 778 case -ECONNRESET:
779 case -ENOENT: 779 case -ENOENT:
780 nfc_dev_dbg(&dev->interface->dev, 780 dev_dbg(&dev->interface->dev,
781 "The urb has been stopped (status %d)", 781 "The urb has been stopped (status %d)\n",
782 urb->status); 782 urb->status);
783 goto sched_wq; 783 goto sched_wq;
784 case -ESHUTDOWN: 784 case -ESHUTDOWN:
785 default: 785 default:
@@ -823,8 +823,6 @@ static int pn533_send_ack(struct pn533 *dev, gfp_t flags)
823 /* spec 7.1.1.3: Preamble, SoPC (2), ACK Code (2), Postamble */ 823 /* spec 7.1.1.3: Preamble, SoPC (2), ACK Code (2), Postamble */
824 int rc; 824 int rc;
825 825
826 nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
827
828 dev->out_urb->transfer_buffer = ack; 826 dev->out_urb->transfer_buffer = ack;
829 dev->out_urb->transfer_buffer_length = sizeof(ack); 827 dev->out_urb->transfer_buffer_length = sizeof(ack);
830 rc = usb_submit_urb(dev->out_urb, flags); 828 rc = usb_submit_urb(dev->out_urb, flags);
@@ -927,7 +925,7 @@ static int __pn533_send_async(struct pn533 *dev, u8 cmd_code,
927 struct pn533_cmd *cmd; 925 struct pn533_cmd *cmd;
928 int rc = 0; 926 int rc = 0;
929 927
930 nfc_dev_dbg(&dev->interface->dev, "Sending command 0x%x", cmd_code); 928 dev_dbg(&dev->interface->dev, "Sending command 0x%x\n", cmd_code);
931 929
932 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); 930 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
933 if (!cmd) 931 if (!cmd)
@@ -954,8 +952,8 @@ static int __pn533_send_async(struct pn533 *dev, u8 cmd_code,
954 goto unlock; 952 goto unlock;
955 } 953 }
956 954
957 nfc_dev_dbg(&dev->interface->dev, "%s Queueing command 0x%x", __func__, 955 dev_dbg(&dev->interface->dev, "%s Queueing command 0x%x\n",
958 cmd_code); 956 __func__, cmd_code);
959 957
960 INIT_LIST_HEAD(&cmd->queue); 958 INIT_LIST_HEAD(&cmd->queue);
961 list_add_tail(&cmd->queue, &dev->cmd_queue); 959 list_add_tail(&cmd->queue, &dev->cmd_queue);
@@ -1168,9 +1166,9 @@ static void pn533_send_complete(struct urb *urb)
1168 break; /* success */ 1166 break; /* success */
1169 case -ECONNRESET: 1167 case -ECONNRESET:
1170 case -ENOENT: 1168 case -ENOENT:
1171 nfc_dev_dbg(&dev->interface->dev, 1169 dev_dbg(&dev->interface->dev,
1172 "The urb has been stopped (status %d)", 1170 "The urb has been stopped (status %d)\n",
1173 urb->status); 1171 urb->status);
1174 break; 1172 break;
1175 case -ESHUTDOWN: 1173 case -ESHUTDOWN:
1176 default: 1174 default:
@@ -1452,8 +1450,8 @@ static int pn533_target_found(struct pn533 *dev, u8 tg, u8 *tgdata,
1452 struct nfc_target nfc_tgt; 1450 struct nfc_target nfc_tgt;
1453 int rc; 1451 int rc;
1454 1452
1455 nfc_dev_dbg(&dev->interface->dev, "%s - modulation=%d", __func__, 1453 dev_dbg(&dev->interface->dev, "%s - modulation=%d\n",
1456 dev->poll_mod_curr); 1454 __func__, dev->poll_mod_curr);
1457 1455
1458 if (tg != 1) 1456 if (tg != 1)
1459 return -EPROTO; 1457 return -EPROTO;
@@ -1484,14 +1482,14 @@ static int pn533_target_found(struct pn533 *dev, u8 tg, u8 *tgdata,
1484 return rc; 1482 return rc;
1485 1483
1486 if (!(nfc_tgt.supported_protocols & dev->poll_protocols)) { 1484 if (!(nfc_tgt.supported_protocols & dev->poll_protocols)) {
1487 nfc_dev_dbg(&dev->interface->dev, 1485 dev_dbg(&dev->interface->dev,
1488 "The Tg found doesn't have the desired protocol"); 1486 "The Tg found doesn't have the desired protocol\n");
1489 return -EAGAIN; 1487 return -EAGAIN;
1490 } 1488 }
1491 1489
1492 nfc_dev_dbg(&dev->interface->dev, 1490 dev_dbg(&dev->interface->dev,
1493 "Target found - supported protocols: 0x%x", 1491 "Target found - supported protocols: 0x%x\n",
1494 nfc_tgt.supported_protocols); 1492 nfc_tgt.supported_protocols);
1495 1493
1496 dev->tgt_available_prots = nfc_tgt.supported_protocols; 1494 dev->tgt_available_prots = nfc_tgt.supported_protocols;
1497 1495
@@ -1548,8 +1546,6 @@ static int pn533_start_poll_complete(struct pn533 *dev, struct sk_buff *resp)
1548 u8 nbtg, tg, *tgdata; 1546 u8 nbtg, tg, *tgdata;
1549 int rc, tgdata_len; 1547 int rc, tgdata_len;
1550 1548
1551 nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
1552
1553 nbtg = resp->data[0]; 1549 nbtg = resp->data[0];
1554 tg = resp->data[1]; 1550 tg = resp->data[1];
1555 tgdata = &resp->data[2]; 1551 tgdata = &resp->data[2];
@@ -1629,7 +1625,7 @@ static int pn533_tm_get_data_complete(struct pn533 *dev, void *arg,
1629{ 1625{
1630 u8 status; 1626 u8 status;
1631 1627
1632 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 1628 dev_dbg(&dev->interface->dev, "%s\n", __func__);
1633 1629
1634 if (IS_ERR(resp)) 1630 if (IS_ERR(resp))
1635 return PTR_ERR(resp); 1631 return PTR_ERR(resp);
@@ -1650,11 +1646,10 @@ static int pn533_tm_get_data_complete(struct pn533 *dev, void *arg,
1650static void pn533_wq_tg_get_data(struct work_struct *work) 1646static void pn533_wq_tg_get_data(struct work_struct *work)
1651{ 1647{
1652 struct pn533 *dev = container_of(work, struct pn533, tg_work); 1648 struct pn533 *dev = container_of(work, struct pn533, tg_work);
1653
1654 struct sk_buff *skb; 1649 struct sk_buff *skb;
1655 int rc; 1650 int rc;
1656 1651
1657 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 1652 dev_dbg(&dev->interface->dev, "%s\n", __func__);
1658 1653
1659 skb = pn533_alloc_skb(dev, 0); 1654 skb = pn533_alloc_skb(dev, 0);
1660 if (!skb) 1655 if (!skb)
@@ -1676,7 +1671,7 @@ static int pn533_init_target_complete(struct pn533 *dev, struct sk_buff *resp)
1676 size_t gb_len; 1671 size_t gb_len;
1677 int rc; 1672 int rc;
1678 1673
1679 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 1674 dev_dbg(&dev->interface->dev, "%s\n", __func__);
1680 1675
1681 if (resp->len < ATR_REQ_GB_OFFSET + 1) 1676 if (resp->len < ATR_REQ_GB_OFFSET + 1)
1682 return -EINVAL; 1677 return -EINVAL;
@@ -1684,8 +1679,8 @@ static int pn533_init_target_complete(struct pn533 *dev, struct sk_buff *resp)
1684 mode = resp->data[0]; 1679 mode = resp->data[0];
1685 cmd = &resp->data[1]; 1680 cmd = &resp->data[1];
1686 1681
1687 nfc_dev_dbg(&dev->interface->dev, "Target mode 0x%x len %d\n", 1682 dev_dbg(&dev->interface->dev, "Target mode 0x%x len %d\n",
1688 mode, resp->len); 1683 mode, resp->len);
1689 1684
1690 if ((mode & PN533_INIT_TARGET_RESP_FRAME_MASK) == 1685 if ((mode & PN533_INIT_TARGET_RESP_FRAME_MASK) ==
1691 PN533_INIT_TARGET_RESP_ACTIVE) 1686 PN533_INIT_TARGET_RESP_ACTIVE)
@@ -1715,7 +1710,7 @@ static void pn533_listen_mode_timer(unsigned long data)
1715{ 1710{
1716 struct pn533 *dev = (struct pn533 *)data; 1711 struct pn533 *dev = (struct pn533 *)data;
1717 1712
1718 nfc_dev_dbg(&dev->interface->dev, "Listen mode timeout"); 1713 dev_dbg(&dev->interface->dev, "Listen mode timeout\n");
1719 1714
1720 dev->cancel_listen = 1; 1715 dev->cancel_listen = 1;
1721 1716
@@ -1730,7 +1725,7 @@ static int pn533_rf_complete(struct pn533 *dev, void *arg,
1730{ 1725{
1731 int rc = 0; 1726 int rc = 0;
1732 1727
1733 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 1728 dev_dbg(&dev->interface->dev, "%s\n", __func__);
1734 1729
1735 if (IS_ERR(resp)) { 1730 if (IS_ERR(resp)) {
1736 rc = PTR_ERR(resp); 1731 rc = PTR_ERR(resp);
@@ -1754,7 +1749,7 @@ static void pn533_wq_rf(struct work_struct *work)
1754 struct sk_buff *skb; 1749 struct sk_buff *skb;
1755 int rc; 1750 int rc;
1756 1751
1757 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 1752 dev_dbg(&dev->interface->dev, "%s\n", __func__);
1758 1753
1759 skb = pn533_alloc_skb(dev, 2); 1754 skb = pn533_alloc_skb(dev, 2);
1760 if (!skb) 1755 if (!skb)
@@ -1779,7 +1774,7 @@ static int pn533_poll_complete(struct pn533 *dev, void *arg,
1779 struct pn533_poll_modulations *cur_mod; 1774 struct pn533_poll_modulations *cur_mod;
1780 int rc; 1775 int rc;
1781 1776
1782 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 1777 dev_dbg(&dev->interface->dev, "%s\n", __func__);
1783 1778
1784 if (IS_ERR(resp)) { 1779 if (IS_ERR(resp)) {
1785 rc = PTR_ERR(resp); 1780 rc = PTR_ERR(resp);
@@ -1813,7 +1808,7 @@ static int pn533_poll_complete(struct pn533 *dev, void *arg,
1813 goto done; 1808 goto done;
1814 1809
1815 if (!dev->poll_mod_count) { 1810 if (!dev->poll_mod_count) {
1816 nfc_dev_dbg(&dev->interface->dev, "Polling has been stopped."); 1811 dev_dbg(&dev->interface->dev, "Polling has been stopped\n");
1817 goto done; 1812 goto done;
1818 } 1813 }
1819 1814
@@ -1856,8 +1851,8 @@ static int pn533_send_poll_frame(struct pn533 *dev)
1856 1851
1857 mod = dev->poll_mod_active[dev->poll_mod_curr]; 1852 mod = dev->poll_mod_active[dev->poll_mod_curr];
1858 1853
1859 nfc_dev_dbg(&dev->interface->dev, "%s mod len %d\n", 1854 dev_dbg(&dev->interface->dev, "%s mod len %d\n",
1860 __func__, mod->len); 1855 __func__, mod->len);
1861 1856
1862 if (mod->len == 0) { /* Listen mode */ 1857 if (mod->len == 0) { /* Listen mode */
1863 cmd_code = PN533_CMD_TG_INIT_AS_TARGET; 1858 cmd_code = PN533_CMD_TG_INIT_AS_TARGET;
@@ -1890,9 +1885,9 @@ static void pn533_wq_poll(struct work_struct *work)
1890 1885
1891 cur_mod = dev->poll_mod_active[dev->poll_mod_curr]; 1886 cur_mod = dev->poll_mod_active[dev->poll_mod_curr];
1892 1887
1893 nfc_dev_dbg(&dev->interface->dev, 1888 dev_dbg(&dev->interface->dev,
1894 "%s cancel_listen %d modulation len %d", 1889 "%s cancel_listen %d modulation len %d\n",
1895 __func__, dev->cancel_listen, cur_mod->len); 1890 __func__, dev->cancel_listen, cur_mod->len);
1896 1891
1897 if (dev->cancel_listen == 1) { 1892 if (dev->cancel_listen == 1) {
1898 dev->cancel_listen = 0; 1893 dev->cancel_listen = 0;
@@ -1915,9 +1910,9 @@ static int pn533_start_poll(struct nfc_dev *nfc_dev,
1915 struct pn533 *dev = nfc_get_drvdata(nfc_dev); 1910 struct pn533 *dev = nfc_get_drvdata(nfc_dev);
1916 u8 rand_mod; 1911 u8 rand_mod;
1917 1912
1918 nfc_dev_dbg(&dev->interface->dev, 1913 dev_dbg(&dev->interface->dev,
1919 "%s: im protocols 0x%x tm protocols 0x%x", 1914 "%s: im protocols 0x%x tm protocols 0x%x\n",
1920 __func__, im_protocols, tm_protocols); 1915 __func__, im_protocols, tm_protocols);
1921 1916
1922 if (dev->tgt_active_prot) { 1917 if (dev->tgt_active_prot) {
1923 nfc_dev_err(&dev->interface->dev, 1918 nfc_dev_err(&dev->interface->dev,
@@ -1953,13 +1948,11 @@ static void pn533_stop_poll(struct nfc_dev *nfc_dev)
1953{ 1948{
1954 struct pn533 *dev = nfc_get_drvdata(nfc_dev); 1949 struct pn533 *dev = nfc_get_drvdata(nfc_dev);
1955 1950
1956 nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
1957
1958 del_timer(&dev->listen_timer); 1951 del_timer(&dev->listen_timer);
1959 1952
1960 if (!dev->poll_mod_count) { 1953 if (!dev->poll_mod_count) {
1961 nfc_dev_dbg(&dev->interface->dev, 1954 dev_dbg(&dev->interface->dev,
1962 "Polling operation was not running"); 1955 "Polling operation was not running\n");
1963 return; 1956 return;
1964 } 1957 }
1965 1958
@@ -1973,11 +1966,10 @@ static int pn533_activate_target_nfcdep(struct pn533 *dev)
1973 struct pn533_cmd_activate_response *rsp; 1966 struct pn533_cmd_activate_response *rsp;
1974 u16 gt_len; 1967 u16 gt_len;
1975 int rc; 1968 int rc;
1976
1977 struct sk_buff *skb; 1969 struct sk_buff *skb;
1978 struct sk_buff *resp; 1970 struct sk_buff *resp;
1979 1971
1980 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 1972 dev_dbg(&dev->interface->dev, "%s\n", __func__);
1981 1973
1982 skb = pn533_alloc_skb(dev, sizeof(u8) * 2); /*TG + Next*/ 1974 skb = pn533_alloc_skb(dev, sizeof(u8) * 2); /*TG + Next*/
1983 if (!skb) 1975 if (!skb)
@@ -2013,12 +2005,12 @@ static int pn533_activate_target(struct nfc_dev *nfc_dev,
2013 struct pn533 *dev = nfc_get_drvdata(nfc_dev); 2005 struct pn533 *dev = nfc_get_drvdata(nfc_dev);
2014 int rc; 2006 int rc;
2015 2007
2016 nfc_dev_dbg(&dev->interface->dev, "%s - protocol=%u", __func__, 2008 dev_dbg(&dev->interface->dev, "%s - protocol=%u\n",
2017 protocol); 2009 __func__, protocol);
2018 2010
2019 if (dev->poll_mod_count) { 2011 if (dev->poll_mod_count) {
2020 nfc_dev_err(&dev->interface->dev, 2012 dev_err(&dev->interface->dev,
2021 "Cannot activate while polling"); 2013 "Cannot activate while polling\n");
2022 return -EBUSY; 2014 return -EBUSY;
2023 } 2015 }
2024 2016
@@ -2060,13 +2052,11 @@ static void pn533_deactivate_target(struct nfc_dev *nfc_dev,
2060 struct nfc_target *target) 2052 struct nfc_target *target)
2061{ 2053{
2062 struct pn533 *dev = nfc_get_drvdata(nfc_dev); 2054 struct pn533 *dev = nfc_get_drvdata(nfc_dev);
2063
2064 struct sk_buff *skb; 2055 struct sk_buff *skb;
2065 struct sk_buff *resp; 2056 struct sk_buff *resp;
2066
2067 int rc; 2057 int rc;
2068 2058
2069 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 2059 dev_dbg(&dev->interface->dev, "%s\n", __func__);
2070 2060
2071 if (!dev->tgt_active_prot) { 2061 if (!dev->tgt_active_prot) {
2072 nfc_dev_err(&dev->interface->dev, "There is no active target"); 2062 nfc_dev_err(&dev->interface->dev, "There is no active target");
@@ -2129,7 +2119,7 @@ static int pn533_in_dep_link_up_complete(struct pn533 *dev, void *arg,
2129 if (!dev->tgt_available_prots) { 2119 if (!dev->tgt_available_prots) {
2130 struct nfc_target nfc_target; 2120 struct nfc_target nfc_target;
2131 2121
2132 nfc_dev_dbg(&dev->interface->dev, "Creating new target"); 2122 dev_dbg(&dev->interface->dev, "Creating new target\n");
2133 2123
2134 nfc_target.supported_protocols = NFC_PROTO_NFC_DEP_MASK; 2124 nfc_target.supported_protocols = NFC_PROTO_NFC_DEP_MASK;
2135 nfc_target.nfcid1_len = 10; 2125 nfc_target.nfcid1_len = 10;
@@ -2166,10 +2156,9 @@ static int pn533_dep_link_up(struct nfc_dev *nfc_dev, struct nfc_target *target,
2166 struct sk_buff *skb; 2156 struct sk_buff *skb;
2167 int rc, skb_len; 2157 int rc, skb_len;
2168 u8 *next, *arg, nfcid3[NFC_NFCID3_MAXSIZE]; 2158 u8 *next, *arg, nfcid3[NFC_NFCID3_MAXSIZE];
2169
2170 u8 passive_data[PASSIVE_DATA_LEN] = {0x00, 0xff, 0xff, 0x00, 0x3}; 2159 u8 passive_data[PASSIVE_DATA_LEN] = {0x00, 0xff, 0xff, 0x00, 0x3};
2171 2160
2172 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 2161 dev_dbg(&dev->interface->dev, "%s\n", __func__);
2173 2162
2174 if (dev->poll_mod_count) { 2163 if (dev->poll_mod_count) {
2175 nfc_dev_err(&dev->interface->dev, 2164 nfc_dev_err(&dev->interface->dev,
@@ -2249,7 +2238,7 @@ static int pn533_dep_link_down(struct nfc_dev *nfc_dev)
2249{ 2238{
2250 struct pn533 *dev = nfc_get_drvdata(nfc_dev); 2239 struct pn533 *dev = nfc_get_drvdata(nfc_dev);
2251 2240
2252 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 2241 dev_dbg(&dev->interface->dev, "%s\n", __func__);
2253 2242
2254 pn533_poll_reset_mod_list(dev); 2243 pn533_poll_reset_mod_list(dev);
2255 2244
@@ -2274,7 +2263,7 @@ static struct sk_buff *pn533_build_response(struct pn533 *dev)
2274 struct sk_buff *skb, *tmp, *t; 2263 struct sk_buff *skb, *tmp, *t;
2275 unsigned int skb_len = 0, tmp_len = 0; 2264 unsigned int skb_len = 0, tmp_len = 0;
2276 2265
2277 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 2266 dev_dbg(&dev->interface->dev, "%s\n", __func__);
2278 2267
2279 if (skb_queue_empty(&dev->resp_q)) 2268 if (skb_queue_empty(&dev->resp_q))
2280 return NULL; 2269 return NULL;
@@ -2287,8 +2276,8 @@ static struct sk_buff *pn533_build_response(struct pn533 *dev)
2287 skb_queue_walk_safe(&dev->resp_q, tmp, t) 2276 skb_queue_walk_safe(&dev->resp_q, tmp, t)
2288 skb_len += tmp->len; 2277 skb_len += tmp->len;
2289 2278
2290 nfc_dev_dbg(&dev->interface->dev, "%s total length %d\n", 2279 dev_dbg(&dev->interface->dev, "%s total length %d\n",
2291 __func__, skb_len); 2280 __func__, skb_len);
2292 2281
2293 skb = alloc_skb(skb_len, GFP_KERNEL); 2282 skb = alloc_skb(skb_len, GFP_KERNEL);
2294 if (skb == NULL) 2283 if (skb == NULL)
@@ -2315,7 +2304,7 @@ static int pn533_data_exchange_complete(struct pn533 *dev, void *_arg,
2315 int rc = 0; 2304 int rc = 0;
2316 u8 status, ret, mi; 2305 u8 status, ret, mi;
2317 2306
2318 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 2307 dev_dbg(&dev->interface->dev, "%s\n", __func__);
2319 2308
2320 if (IS_ERR(resp)) { 2309 if (IS_ERR(resp)) {
2321 rc = PTR_ERR(resp); 2310 rc = PTR_ERR(resp);
@@ -2420,7 +2409,7 @@ static int pn533_transceive(struct nfc_dev *nfc_dev,
2420 struct pn533_data_exchange_arg *arg = NULL; 2409 struct pn533_data_exchange_arg *arg = NULL;
2421 int rc; 2410 int rc;
2422 2411
2423 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 2412 dev_dbg(&dev->interface->dev, "%s\n", __func__);
2424 2413
2425 if (!dev->tgt_active_prot) { 2414 if (!dev->tgt_active_prot) {
2426 nfc_dev_err(&dev->interface->dev, 2415 nfc_dev_err(&dev->interface->dev,
@@ -2487,7 +2476,7 @@ static int pn533_tm_send_complete(struct pn533 *dev, void *arg,
2487{ 2476{
2488 u8 status; 2477 u8 status;
2489 2478
2490 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 2479 dev_dbg(&dev->interface->dev, "%s\n", __func__);
2491 2480
2492 if (IS_ERR(resp)) 2481 if (IS_ERR(resp))
2493 return PTR_ERR(resp); 2482 return PTR_ERR(resp);
@@ -2514,7 +2503,7 @@ static int pn533_tm_send(struct nfc_dev *nfc_dev, struct sk_buff *skb)
2514 struct pn533 *dev = nfc_get_drvdata(nfc_dev); 2503 struct pn533 *dev = nfc_get_drvdata(nfc_dev);
2515 int rc; 2504 int rc;
2516 2505
2517 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 2506 dev_dbg(&dev->interface->dev, "%s\n", __func__);
2518 2507
2519 if (skb->len > PN533_CMD_DATAEXCH_DATA_MAXLEN) { 2508 if (skb->len > PN533_CMD_DATAEXCH_DATA_MAXLEN) {
2520 nfc_dev_err(&dev->interface->dev, 2509 nfc_dev_err(&dev->interface->dev,
@@ -2534,11 +2523,10 @@ static int pn533_tm_send(struct nfc_dev *nfc_dev, struct sk_buff *skb)
2534static void pn533_wq_mi_recv(struct work_struct *work) 2523static void pn533_wq_mi_recv(struct work_struct *work)
2535{ 2524{
2536 struct pn533 *dev = container_of(work, struct pn533, mi_rx_work); 2525 struct pn533 *dev = container_of(work, struct pn533, mi_rx_work);
2537
2538 struct sk_buff *skb; 2526 struct sk_buff *skb;
2539 int rc; 2527 int rc;
2540 2528
2541 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 2529 dev_dbg(&dev->interface->dev, "%s\n", __func__);
2542 2530
2543 skb = pn533_alloc_skb(dev, PN533_CMD_DATAEXCH_HEAD_LEN); 2531 skb = pn533_alloc_skb(dev, PN533_CMD_DATAEXCH_HEAD_LEN);
2544 if (!skb) 2532 if (!skb)
@@ -2587,7 +2575,7 @@ static void pn533_wq_mi_send(struct work_struct *work)
2587 struct sk_buff *skb; 2575 struct sk_buff *skb;
2588 int rc; 2576 int rc;
2589 2577
2590 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 2578 dev_dbg(&dev->interface->dev, "%s\n", __func__);
2591 2579
2592 /* Grab the first skb in the queue */ 2580 /* Grab the first skb in the queue */
2593 skb = skb_dequeue(&dev->fragment_skb); 2581 skb = skb_dequeue(&dev->fragment_skb);
@@ -2641,10 +2629,9 @@ static int pn533_set_configuration(struct pn533 *dev, u8 cfgitem, u8 *cfgdata,
2641{ 2629{
2642 struct sk_buff *skb; 2630 struct sk_buff *skb;
2643 struct sk_buff *resp; 2631 struct sk_buff *resp;
2644
2645 int skb_len; 2632 int skb_len;
2646 2633
2647 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 2634 dev_dbg(&dev->interface->dev, "%s\n", __func__);
2648 2635
2649 skb_len = sizeof(cfgitem) + cfgdata_len; /* cfgitem + cfgdata */ 2636 skb_len = sizeof(cfgitem) + cfgdata_len; /* cfgitem + cfgdata */
2650 2637
@@ -2691,7 +2678,7 @@ static int pn533_pasori_fw_reset(struct pn533 *dev)
2691 struct sk_buff *skb; 2678 struct sk_buff *skb;
2692 struct sk_buff *resp; 2679 struct sk_buff *resp;
2693 2680
2694 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 2681 dev_dbg(&dev->interface->dev, "%s\n", __func__);
2695 2682
2696 skb = pn533_alloc_skb(dev, sizeof(u8)); 2683 skb = pn533_alloc_skb(dev, sizeof(u8));
2697 if (!skb) 2684 if (!skb)
@@ -2717,7 +2704,7 @@ static void pn533_acr122_poweron_rdr_resp(struct urb *urb)
2717{ 2704{
2718 struct pn533_acr122_poweron_rdr_arg *arg = urb->context; 2705 struct pn533_acr122_poweron_rdr_arg *arg = urb->context;
2719 2706
2720 nfc_dev_dbg(&urb->dev->dev, "%s", __func__); 2707 dev_dbg(&urb->dev->dev, "%s\n", __func__);
2721 2708
2722 print_hex_dump_debug("ACR122 RX: ", DUMP_PREFIX_NONE, 16, 1, 2709 print_hex_dump_debug("ACR122 RX: ", DUMP_PREFIX_NONE, 16, 1,
2723 urb->transfer_buffer, urb->transfer_buffer_length, 2710 urb->transfer_buffer, urb->transfer_buffer_length,
@@ -2737,7 +2724,7 @@ static int pn533_acr122_poweron_rdr(struct pn533 *dev)
2737 void *cntx; 2724 void *cntx;
2738 struct pn533_acr122_poweron_rdr_arg arg; 2725 struct pn533_acr122_poweron_rdr_arg arg;
2739 2726
2740 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 2727 dev_dbg(&dev->interface->dev, "%s\n", __func__);
2741 2728
2742 init_completion(&arg.done); 2729 init_completion(&arg.done);
2743 cntx = dev->in_urb->context; /* backup context */ 2730 cntx = dev->in_urb->context; /* backup context */