aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>2012-12-10 08:42:55 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2013-01-09 18:51:42 -0500
commitfcfafc7690164d08dfd8133a860f25db8019ca2e (patch)
tree8f942cd0c96a738d294e4f977aeedd704bc4ce24 /drivers/nfc
parentf8f991710b580878c88cfe49d918cfb0c9e15236 (diff)
NFC: pn533: Cleanup debug messages
Remove debug messages which do not include valueable informations in debug mode. Add some new ones for better tracking or reword when if necessary. 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.c32
1 files changed, 7 insertions, 25 deletions
diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c
index 898375d95f36..5fb5b8f1ef3f 100644
--- a/drivers/nfc/pn533.c
+++ b/drivers/nfc/pn533.c
@@ -524,6 +524,7 @@ static void pn533_recv_response(struct urb *urb)
524 524
525 in_frame = dev->in_urb->transfer_buffer; 525 in_frame = dev->in_urb->transfer_buffer;
526 526
527 nfc_dev_dbg(&dev->interface->dev, "Received a frame.");
527 print_hex_dump(KERN_DEBUG, "PN533 RX: ", DUMP_PREFIX_NONE, 16, 1, 528 print_hex_dump(KERN_DEBUG, "PN533 RX: ", DUMP_PREFIX_NONE, 16, 1,
528 in_frame, PN533_FRAME_SIZE(in_frame), false); 529 in_frame, PN533_FRAME_SIZE(in_frame), false);
529 530
@@ -540,7 +541,6 @@ static void pn533_recv_response(struct urb *urb)
540 goto sched_wq; 541 goto sched_wq;
541 } 542 }
542 543
543 nfc_dev_dbg(&dev->interface->dev, "Received a valid frame");
544 dev->wq_in_error = 0; 544 dev->wq_in_error = 0;
545 dev->wq_in_frame = in_frame; 545 dev->wq_in_frame = in_frame;
546 546
@@ -588,8 +588,6 @@ static void pn533_recv_ack(struct urb *urb)
588 goto sched_wq; 588 goto sched_wq;
589 } 589 }
590 590
591 nfc_dev_dbg(&dev->interface->dev, "Received a valid ack");
592
593 rc = pn533_submit_urb_for_response(dev, GFP_ATOMIC); 591 rc = pn533_submit_urb_for_response(dev, GFP_ATOMIC);
594 if (rc) { 592 if (rc) {
595 nfc_dev_err(&dev->interface->dev, 593 nfc_dev_err(&dev->interface->dev,
@@ -636,9 +634,6 @@ static int __pn533_send_cmd_frame_async(struct pn533 *dev,
636{ 634{
637 int rc; 635 int rc;
638 636
639 nfc_dev_dbg(&dev->interface->dev, "Sending command 0x%x",
640 PN533_FRAME_CMD(out_frame));
641
642 dev->cmd = PN533_FRAME_CMD(out_frame); 637 dev->cmd = PN533_FRAME_CMD(out_frame);
643 dev->cmd_complete = cmd_complete; 638 dev->cmd_complete = cmd_complete;
644 dev->cmd_complete_arg = arg; 639 dev->cmd_complete_arg = arg;
@@ -705,10 +700,6 @@ static int pn533_send_async_complete(struct pn533 *dev, void *_arg, u8 *params,
705 dev_kfree_skb(req); 700 dev_kfree_skb(req);
706 701
707 if (params_len < 0) { 702 if (params_len < 0) {
708 nfc_dev_err(&dev->interface->dev,
709 "Error %d when starting as a target",
710 params_len);
711
712 arg->complete_cb(dev, arg->complete_cb_context, 703 arg->complete_cb(dev, arg->complete_cb_context,
713 ERR_PTR(params_len)); 704 ERR_PTR(params_len));
714 rc = params_len; 705 rc = params_len;
@@ -737,7 +728,7 @@ static int __pn533_send_async(struct pn533 *dev, u8 cmd_code,
737 struct pn533_send_async_complete_arg *arg; 728 struct pn533_send_async_complete_arg *arg;
738 int rc = 0; 729 int rc = 0;
739 730
740 nfc_dev_dbg(&dev->interface->dev, "%s", __func__); 731 nfc_dev_dbg(&dev->interface->dev, "Sending command 0x%x", cmd_code);
741 732
742 arg = kzalloc(sizeof(arg), GFP_KERNEL); 733 arg = kzalloc(sizeof(arg), GFP_KERNEL);
743 if (!arg) 734 if (!arg)
@@ -765,7 +756,8 @@ static int __pn533_send_async(struct pn533 *dev, u8 cmd_code,
765 goto unlock; 756 goto unlock;
766 } 757 }
767 758
768 nfc_dev_dbg(&dev->interface->dev, "%s Queueing command", __func__); 759 nfc_dev_dbg(&dev->interface->dev, "%s Queueing command 0x%x", __func__,
760 cmd_code);
769 761
770 cmd = kzalloc(sizeof(struct pn533_cmd), GFP_KERNEL); 762 cmd = kzalloc(sizeof(struct pn533_cmd), GFP_KERNEL);
771 if (!cmd) { 763 if (!cmd) {
@@ -801,8 +793,6 @@ static int pn533_send_data_async(struct pn533 *dev, u8 cmd_code,
801 PN533_FRAME_MAX_PAYLOAD_LEN + 793 PN533_FRAME_MAX_PAYLOAD_LEN +
802 PN533_FRAME_TAIL_LEN; 794 PN533_FRAME_TAIL_LEN;
803 795
804 nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
805
806 resp = nfc_alloc_recv_skb(resp_len, GFP_KERNEL); 796 resp = nfc_alloc_recv_skb(resp_len, GFP_KERNEL);
807 if (!resp) 797 if (!resp)
808 return -ENOMEM; 798 return -ENOMEM;
@@ -823,8 +813,6 @@ static int pn533_send_cmd_async(struct pn533 *dev, u8 cmd_code,
823 struct sk_buff *resp; 813 struct sk_buff *resp;
824 int rc; 814 int rc;
825 815
826 nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
827
828 resp = alloc_skb(PN533_NORMAL_FRAME_MAX_LEN, GFP_KERNEL); 816 resp = alloc_skb(PN533_NORMAL_FRAME_MAX_LEN, GFP_KERNEL);
829 if (!resp) 817 if (!resp)
830 return -ENOMEM; 818 return -ENOMEM;
@@ -858,8 +846,6 @@ static int pn533_send_cmd_direct_async(struct pn533 *dev, u8 cmd_code,
858 PN533_FRAME_MAX_PAYLOAD_LEN + 846 PN533_FRAME_MAX_PAYLOAD_LEN +
859 PN533_FRAME_TAIL_LEN; 847 PN533_FRAME_TAIL_LEN;
860 848
861 nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
862
863 resp = alloc_skb(resp_len, GFP_KERNEL); 849 resp = alloc_skb(resp_len, GFP_KERNEL);
864 if (!resp) 850 if (!resp)
865 return -ENOMEM; 851 return -ENOMEM;
@@ -928,8 +914,6 @@ static int pn533_send_sync_complete(struct pn533 *dev, void *_arg,
928{ 914{
929 struct pn533_sync_cmd_response *arg = _arg; 915 struct pn533_sync_cmd_response *arg = _arg;
930 916
931 nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
932
933 arg->resp = resp; 917 arg->resp = resp;
934 complete(&arg->done); 918 complete(&arg->done);
935 919
@@ -959,8 +943,6 @@ static struct sk_buff *pn533_send_cmd_sync(struct pn533 *dev, u8 cmd_code,
959 int rc; 943 int rc;
960 struct pn533_sync_cmd_response arg; 944 struct pn533_sync_cmd_response arg;
961 945
962 nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
963
964 init_completion(&arg.done); 946 init_completion(&arg.done);
965 947
966 rc = pn533_send_cmd_async(dev, cmd_code, req, 948 rc = pn533_send_cmd_async(dev, cmd_code, req,
@@ -979,8 +961,6 @@ static void pn533_send_complete(struct urb *urb)
979{ 961{
980 struct pn533 *dev = urb->context; 962 struct pn533 *dev = urb->context;
981 963
982 nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
983
984 switch (urb->status) { 964 switch (urb->status) {
985 case 0: 965 case 0:
986 break; /* success */ 966 break; /* success */
@@ -1992,6 +1972,8 @@ static int pn533_dep_link_down(struct nfc_dev *nfc_dev)
1992{ 1972{
1993 struct pn533 *dev = nfc_get_drvdata(nfc_dev); 1973 struct pn533 *dev = nfc_get_drvdata(nfc_dev);
1994 1974
1975 nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
1976
1995 pn533_poll_reset_mod_list(dev); 1977 pn533_poll_reset_mod_list(dev);
1996 1978
1997 if (dev->tgt_mode || dev->tgt_active_prot) { 1979 if (dev->tgt_mode || dev->tgt_active_prot) {
@@ -2017,7 +1999,7 @@ static struct sk_buff *pn533_build_response(struct pn533 *dev)
2017 struct sk_buff *skb, *tmp, *t; 1999 struct sk_buff *skb, *tmp, *t;
2018 unsigned int skb_len = 0, tmp_len = 0; 2000 unsigned int skb_len = 0, tmp_len = 0;
2019 2001
2020 nfc_dev_dbg(&dev->interface->dev, "%s\n", __func__); 2002 nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
2021 2003
2022 if (skb_queue_empty(&dev->resp_q)) 2004 if (skb_queue_empty(&dev->resp_q))
2023 return NULL; 2005 return NULL;