aboutsummaryrefslogtreecommitdiff
path: root/drivers/nfc
diff options
context:
space:
mode:
authorEric Lapuyade <eric.lapuyade@linux.intel.com>2012-10-02 17:27:36 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2012-10-26 18:26:46 +0200
commit632c016ab8ba1f98262bd6242b38d73ee4ae652e (patch)
tree7349250c5faa50c93a48ee5eba81e9fdad682439 /drivers/nfc
parentda052850b911dfd0fcd5c8d6308917ebe2edbacf (diff)
NFC: HCI check presence must not fail when driver doesn't support it
When the driver does not support checking the tag is still present, it must return -EOPNOTSUPP. The NFC Core will then stop asking and not report a tag lost event to user space. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/pn544_hci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nfc/pn544_hci.c b/drivers/nfc/pn544_hci.c
index b66d4681a577..70858b5f81e4 100644
--- a/drivers/nfc/pn544_hci.c
+++ b/drivers/nfc/pn544_hci.c
@@ -986,7 +986,7 @@ static int pn544_hci_check_presence(struct nfc_hci_dev *hdev,
} else if (target->supported_protocols & NFC_PROTO_MIFARE_MASK) {
if (target->nfcid1_len != 4 && target->nfcid1_len != 7 &&
target->nfcid1_len != 10)
- return -EPROTO;
+ return -EOPNOTSUPP;
return nfc_hci_send_cmd(hdev, NFC_HCI_RF_READER_A_GATE,
PN544_RF_READER_CMD_ACTIVATE_NEXT,