diff options
-rw-r--r-- | include/net/bluetooth/bluetooth.h | 2 | ||||
-rw-r--r-- | net/bluetooth/hci_core.c | 2 | ||||
-rw-r--r-- | net/bluetooth/l2cap_core.c | 4 | ||||
-rw-r--r-- | net/bluetooth/lib.c | 4 | ||||
-rw-r--r-- | net/bluetooth/sco.c | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 7bccaf921cab..7d77545fdd64 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
@@ -204,7 +204,7 @@ out: | |||
204 | return NULL; | 204 | return NULL; |
205 | } | 205 | } |
206 | 206 | ||
207 | int bt_err(__u16 code); | 207 | int bt_to_errno(__u16 code); |
208 | 208 | ||
209 | extern int hci_sock_init(void); | 209 | extern int hci_sock_init(void); |
210 | extern void hci_sock_cleanup(void); | 210 | extern void hci_sock_cleanup(void); |
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 0029e178e52e..cd59b849d055 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -148,7 +148,7 @@ static int __hci_request(struct hci_dev *hdev, void (*req)(struct hci_dev *hdev, | |||
148 | 148 | ||
149 | switch (hdev->req_status) { | 149 | switch (hdev->req_status) { |
150 | case HCI_REQ_DONE: | 150 | case HCI_REQ_DONE: |
151 | err = -bt_err(hdev->req_result); | 151 | err = -bt_to_errno(hdev->req_result); |
152 | break; | 152 | break; |
153 | 153 | ||
154 | case HCI_REQ_CANCELED: | 154 | case HCI_REQ_CANCELED: |
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index fb5238133005..becf2ad72208 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -4107,7 +4107,7 @@ static int l2cap_connect_cfm(struct hci_conn *hcon, u8 status) | |||
4107 | if (conn) | 4107 | if (conn) |
4108 | l2cap_conn_ready(conn); | 4108 | l2cap_conn_ready(conn); |
4109 | } else | 4109 | } else |
4110 | l2cap_conn_del(hcon, bt_err(status)); | 4110 | l2cap_conn_del(hcon, bt_to_errno(status)); |
4111 | 4111 | ||
4112 | return 0; | 4112 | return 0; |
4113 | } | 4113 | } |
@@ -4131,7 +4131,7 @@ static int l2cap_disconn_cfm(struct hci_conn *hcon, u8 reason) | |||
4131 | if (!(hcon->type == ACL_LINK || hcon->type == LE_LINK)) | 4131 | if (!(hcon->type == ACL_LINK || hcon->type == LE_LINK)) |
4132 | return -EINVAL; | 4132 | return -EINVAL; |
4133 | 4133 | ||
4134 | l2cap_conn_del(hcon, bt_err(reason)); | 4134 | l2cap_conn_del(hcon, bt_to_errno(reason)); |
4135 | 4135 | ||
4136 | return 0; | 4136 | return 0; |
4137 | } | 4137 | } |
diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c index b826d1bf10df..4e7cf8b0bd87 100644 --- a/net/bluetooth/lib.c +++ b/net/bluetooth/lib.c | |||
@@ -59,7 +59,7 @@ char *batostr(bdaddr_t *ba) | |||
59 | EXPORT_SYMBOL(batostr); | 59 | EXPORT_SYMBOL(batostr); |
60 | 60 | ||
61 | /* Bluetooth error codes to Unix errno mapping */ | 61 | /* Bluetooth error codes to Unix errno mapping */ |
62 | int bt_err(__u16 code) | 62 | int bt_to_errno(__u16 code) |
63 | { | 63 | { |
64 | switch (code) { | 64 | switch (code) { |
65 | case 0: | 65 | case 0: |
@@ -149,4 +149,4 @@ int bt_err(__u16 code) | |||
149 | return ENOSYS; | 149 | return ENOSYS; |
150 | } | 150 | } |
151 | } | 151 | } |
152 | EXPORT_SYMBOL(bt_err); | 152 | EXPORT_SYMBOL(bt_to_errno); |
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index cb4fb7837e5c..4c3621b5e0aa 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c | |||
@@ -932,7 +932,7 @@ static int sco_connect_cfm(struct hci_conn *hcon, __u8 status) | |||
932 | if (conn) | 932 | if (conn) |
933 | sco_conn_ready(conn); | 933 | sco_conn_ready(conn); |
934 | } else | 934 | } else |
935 | sco_conn_del(hcon, bt_err(status)); | 935 | sco_conn_del(hcon, bt_to_errno(status)); |
936 | 936 | ||
937 | return 0; | 937 | return 0; |
938 | } | 938 | } |
@@ -944,7 +944,7 @@ static int sco_disconn_cfm(struct hci_conn *hcon, __u8 reason) | |||
944 | if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK) | 944 | if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK) |
945 | return -EINVAL; | 945 | return -EINVAL; |
946 | 946 | ||
947 | sco_conn_del(hcon, bt_err(reason)); | 947 | sco_conn_del(hcon, bt_to_errno(reason)); |
948 | 948 | ||
949 | return 0; | 949 | return 0; |
950 | } | 950 | } |