mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
NFC: Changed the HCI cmd execution callback prototype
Make it match the data_exchange_cb_t so that it can be used directly in the implementation of an asynchronous hci_transceive Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
c1be211727
commit
b5faa648fa
4 changed files with 21 additions and 24 deletions
|
@ -57,12 +57,11 @@ static void nfc_hci_msg_tx_work(struct work_struct *work)
|
|||
if (hdev->cmd_pending_msg) {
|
||||
if (timer_pending(&hdev->cmd_timer) == 0) {
|
||||
if (hdev->cmd_pending_msg->cb)
|
||||
hdev->cmd_pending_msg->cb(hdev,
|
||||
-ETIME,
|
||||
NULL,
|
||||
hdev->
|
||||
hdev->cmd_pending_msg->cb(hdev->
|
||||
cmd_pending_msg->
|
||||
cb_context);
|
||||
cb_context,
|
||||
NULL,
|
||||
-ETIME);
|
||||
kfree(hdev->cmd_pending_msg);
|
||||
hdev->cmd_pending_msg = NULL;
|
||||
} else
|
||||
|
@ -83,7 +82,7 @@ next_msg:
|
|||
kfree_skb(skb);
|
||||
skb_queue_purge(&msg->msg_frags);
|
||||
if (msg->cb)
|
||||
msg->cb(hdev, r, NULL, msg->cb_context);
|
||||
msg->cb(msg->cb_context, NULL, r);
|
||||
kfree(msg);
|
||||
break;
|
||||
}
|
||||
|
@ -133,8 +132,8 @@ static void __nfc_hci_cmd_completion(struct nfc_hci_dev *hdev, int err,
|
|||
del_timer_sync(&hdev->cmd_timer);
|
||||
|
||||
if (hdev->cmd_pending_msg->cb)
|
||||
hdev->cmd_pending_msg->cb(hdev, err, skb,
|
||||
hdev->cmd_pending_msg->cb_context);
|
||||
hdev->cmd_pending_msg->cb(hdev->cmd_pending_msg->cb_context,
|
||||
skb, err);
|
||||
else
|
||||
kfree_skb(skb);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue