diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2015-11-11 08:11:25 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-11-19 17:50:30 +0100 |
commit | a1d01db1202ee6795c0a665b43896293ad4e2a77 (patch) | |
tree | 6819b41eac718e063be46d8dee6aa860486f2b20 /net/bluetooth/hci_request.h | |
parent | 591752afbcc8179979296698cae698541d2e5431 (diff) | |
download | blackbird-op-linux-a1d01db1202ee6795c0a665b43896293ad4e2a77.tar.gz blackbird-op-linux-a1d01db1202ee6795c0a665b43896293ad4e2a77.zip |
Bluetooth: Add error return value to hci_req_sync callback
In some circumstances it may be useful to abort the request through
checks done in the request callback. To make the feature possible this
patch changes the return value of the request callback from void to
int and aborts the request if a non-zero value is returned.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_request.h')
-rw-r--r-- | net/bluetooth/hci_request.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/bluetooth/hci_request.h b/net/bluetooth/hci_request.h index 1f1194628652..1927013f5e67 100644 --- a/net/bluetooth/hci_request.h +++ b/net/bluetooth/hci_request.h @@ -44,11 +44,11 @@ void hci_req_cmd_complete(struct hci_dev *hdev, u16 opcode, u8 status, hci_req_complete_t *req_complete, hci_req_complete_skb_t *req_complete_skb); -int hci_req_sync(struct hci_dev *hdev, void (*req)(struct hci_request *req, - unsigned long opt), +int hci_req_sync(struct hci_dev *hdev, int (*req)(struct hci_request *req, + unsigned long opt), unsigned long opt, u32 timeout, u8 *hci_status); -int __hci_req_sync(struct hci_dev *hdev, void (*func)(struct hci_request *req, - unsigned long opt), +int __hci_req_sync(struct hci_dev *hdev, int (*func)(struct hci_request *req, + unsigned long opt), unsigned long opt, u32 timeout, u8 *hci_status); void hci_req_sync_cancel(struct hci_dev *hdev, int err); |