mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
NFC: nci: add nci_get_conn_info_by_id function
This functin takes as a parameter a pointer to the nci_dev struct and the first byte from the values of the first domain specific parameter that was used for the connection creation. Signed-off-by: Robert Dolca <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
parent
caa575a86e
commit
85b9ce9a21
2 changed files with 14 additions and 0 deletions
|
|
@ -64,6 +64,19 @@ struct nci_conn_info *nci_get_conn_info_by_conn_id(struct nci_dev *ndev,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
int nci_get_conn_info_by_id(struct nci_dev *ndev, u8 id)
|
||||
{
|
||||
struct nci_conn_info *conn_info;
|
||||
|
||||
list_for_each_entry(conn_info, &ndev->conn_info_list, list) {
|
||||
if (conn_info->id == id)
|
||||
return conn_info->conn_id;
|
||||
}
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
EXPORT_SYMBOL(nci_get_conn_info_by_id);
|
||||
|
||||
/* ---- NCI requests ---- */
|
||||
|
||||
void nci_req_complete(struct nci_dev *ndev, int result)
|
||||
|
|
|
|||
Loading…
Reference in a new issue