]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
NFC: pn533: Print out response status bits in hex
authorWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Wed, 3 Apr 2013 06:01:59 +0000 (08:01 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 11 Apr 2013 14:29:00 +0000 (16:29 +0200)
For better debugging as the codes are defined in hex in the spec.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/pn533.c

index 8e809e083c33e5e6ad40944da9128cd6fc916d0b..8ee032d3faa0009c4dd2dfceec7dbdcce313bf08 100644 (file)
@@ -1724,6 +1724,8 @@ static int pn533_activate_target_nfcdep(struct pn533 *dev)
        rsp = (struct pn533_cmd_activate_response *)resp->data;
        rc = rsp->status & PN533_CMD_RET_MASK;
        if (rc != PN533_CMD_RET_SUCCESS) {
+               nfc_dev_err(&dev->interface->dev,
+                           "Target activation failed (error 0x%x)", rc);
                dev_kfree_skb(resp);
                return -EIO;
        }
@@ -1851,7 +1853,7 @@ static int pn533_in_dep_link_up_complete(struct pn533 *dev, void *arg,
        rc = rsp->status & PN533_CMD_RET_MASK;
        if (rc != PN533_CMD_RET_SUCCESS) {
                nfc_dev_err(&dev->interface->dev,
-                           "Bringing DEP link up failed %d", rc);
+                           "Bringing DEP link up failed (error 0x%x)", rc);
                goto error;
        }
 
@@ -2065,8 +2067,7 @@ static int pn533_data_exchange_complete(struct pn533 *dev, void *_arg,
 
        if (ret != PN533_CMD_RET_SUCCESS) {
                nfc_dev_err(&dev->interface->dev,
-                           "PN533 reported error %d when exchanging data",
-                           ret);
+                           "Exchanging data failed (error 0x%x)", ret);
                rc = -EIO;
                goto error;
        }