Skip to content

Commit

Permalink
NFC: pn533: Fix ACR122 related debug output
Browse files Browse the repository at this point in the history
Instead of dumping ACR122 frames as errors, we use the print_hex_dump()
dynamic debug APIs.
We also print an accurate IC version, as the ACR122 is pn532 based.

Signed-off-by: Olivier Guiter <olivier.guiter@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Olivier Guiter authored and Samuel Ortiz committed Jun 14, 2013
1 parent be08565 commit 86eca4e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/nfc/pn533.c
Original file line number Diff line number Diff line change
Expand Up @@ -2501,7 +2501,7 @@ static void pn533_acr122_poweron_rdr_resp(struct urb *urb)

nfc_dev_dbg(&urb->dev->dev, "%s", __func__);

print_hex_dump(KERN_ERR, "ACR122 RX: ", DUMP_PREFIX_NONE, 16, 1,
print_hex_dump_debug("ACR122 RX: ", DUMP_PREFIX_NONE, 16, 1,
urb->transfer_buffer, urb->transfer_buffer_length,
false);

Expand Down Expand Up @@ -2532,7 +2532,7 @@ static int pn533_acr122_poweron_rdr(struct pn533 *dev)
dev->out_urb->transfer_buffer = cmd;
dev->out_urb->transfer_buffer_length = sizeof(cmd);

print_hex_dump(KERN_ERR, "ACR122 TX: ", DUMP_PREFIX_NONE, 16, 1,
print_hex_dump_debug("ACR122 TX: ", DUMP_PREFIX_NONE, 16, 1,
cmd, sizeof(cmd), false);

rc = usb_submit_urb(dev->out_urb, GFP_KERNEL);
Expand Down Expand Up @@ -2786,8 +2786,8 @@ static int pn533_probe(struct usb_interface *interface,
goto destroy_wq;

nfc_dev_info(&dev->interface->dev,
"NXP PN533 firmware ver %d.%d now attached",
fw_ver.ver, fw_ver.rev);
"NXP PN5%02X firmware ver %d.%d now attached",
fw_ver.ic, fw_ver.ver, fw_ver.rev);


dev->nfc_dev = nfc_allocate_device(&pn533_nfc_ops, protocols,
Expand Down

0 comments on commit 86eca4e

Please sign in to comment.