Commit a45e1c8d authored by Waldemar Rymarkiewicz's avatar Waldemar Rymarkiewicz Committed by Samuel Ortiz

NFC: pn533: Print out response status bits in hex

For better debugging as the codes are defined in hex in the spec.
Signed-off-by: default avatarWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 63123108
...@@ -1724,6 +1724,8 @@ static int pn533_activate_target_nfcdep(struct pn533 *dev) ...@@ -1724,6 +1724,8 @@ static int pn533_activate_target_nfcdep(struct pn533 *dev)
rsp = (struct pn533_cmd_activate_response *)resp->data; rsp = (struct pn533_cmd_activate_response *)resp->data;
rc = rsp->status & PN533_CMD_RET_MASK; rc = rsp->status & PN533_CMD_RET_MASK;
if (rc != PN533_CMD_RET_SUCCESS) { if (rc != PN533_CMD_RET_SUCCESS) {
nfc_dev_err(&dev->interface->dev,
"Target activation failed (error 0x%x)", rc);
dev_kfree_skb(resp); dev_kfree_skb(resp);
return -EIO; return -EIO;
} }
...@@ -1851,7 +1853,7 @@ static int pn533_in_dep_link_up_complete(struct pn533 *dev, void *arg, ...@@ -1851,7 +1853,7 @@ static int pn533_in_dep_link_up_complete(struct pn533 *dev, void *arg,
rc = rsp->status & PN533_CMD_RET_MASK; rc = rsp->status & PN533_CMD_RET_MASK;
if (rc != PN533_CMD_RET_SUCCESS) { if (rc != PN533_CMD_RET_SUCCESS) {
nfc_dev_err(&dev->interface->dev, nfc_dev_err(&dev->interface->dev,
"Bringing DEP link up failed %d", rc); "Bringing DEP link up failed (error 0x%x)", rc);
goto error; goto error;
} }
...@@ -2065,8 +2067,7 @@ static int pn533_data_exchange_complete(struct pn533 *dev, void *_arg, ...@@ -2065,8 +2067,7 @@ static int pn533_data_exchange_complete(struct pn533 *dev, void *_arg,
if (ret != PN533_CMD_RET_SUCCESS) { if (ret != PN533_CMD_RET_SUCCESS) {
nfc_dev_err(&dev->interface->dev, nfc_dev_err(&dev->interface->dev,
"PN533 reported error %d when exchanging data", "Exchanging data failed (error 0x%x)", ret);
ret);
rc = -EIO; rc = -EIO;
goto error; goto error;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment