NFC: netlink: Add mode parameter to deactivate_target functions

In order to manage in a better way the nci poll mode state machine,
add mode parameter to deactivate_target functions.
This way we can manage different target state.
mode parameter make sense only in nci core.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Christophe Ricard
2015-10-25 22:54:43 +01:00
committed by Samuel Ortiz
parent cde2aa99ba
commit 96d4581f0b
10 changed files with 27 additions and 14 deletions

View File

@@ -449,7 +449,7 @@ error:
* @dev: The nfc device that found the target
* @target_idx: index of the target that must be deactivated
*/
int nfc_deactivate_target(struct nfc_dev *dev, u32 target_idx)
int nfc_deactivate_target(struct nfc_dev *dev, u32 target_idx, u8 mode)
{
int rc = 0;
@@ -476,7 +476,7 @@ int nfc_deactivate_target(struct nfc_dev *dev, u32 target_idx)
if (dev->ops->check_presence)
del_timer_sync(&dev->check_pres_timer);
dev->ops->deactivate_target(dev, dev->active_target);
dev->ops->deactivate_target(dev, dev->active_target, mode);
dev->active_target = NULL;
error: