mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 17:11:46 +00:00
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>
This commit is contained in:
parent
da052850b9
commit
632c016ab8
2 changed files with 4 additions and 1 deletions
|
@ -697,6 +697,8 @@ static void nfc_check_pres_work(struct work_struct *work)
|
|||
|
||||
if (dev->active_target && timer_pending(&dev->check_pres_timer) == 0) {
|
||||
rc = dev->ops->check_presence(dev, dev->active_target);
|
||||
if (rc == -EOPNOTSUPP)
|
||||
goto exit;
|
||||
if (!rc) {
|
||||
mod_timer(&dev->check_pres_timer, jiffies +
|
||||
msecs_to_jiffies(NFC_CHECK_PRES_FREQ_MS));
|
||||
|
@ -708,6 +710,7 @@ static void nfc_check_pres_work(struct work_struct *work)
|
|||
}
|
||||
}
|
||||
|
||||
exit:
|
||||
device_unlock(&dev->dev);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue