aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-06-29 21:18:29 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2011-06-30 17:44:08 -0400
commite175072f377047e28e399c5c661e39e69722f35b (patch)
treea82e4a67efe76fefcbe958c258fafbd96afaa471 /net/bluetooth
parent942ecc9c4643db5ce071562e0a23f99464d6b461 (diff)
Bluetooth: Rename function bt_err to bt_to_errno
Make it easier to use more normal logging styles later. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_core.c2
-rw-r--r--net/bluetooth/l2cap_core.c4
-rw-r--r--net/bluetooth/lib.c4
-rw-r--r--net/bluetooth/sco.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 0029e178e52..cd59b849d05 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 fb523813300..becf2ad7220 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 b826d1bf10d..4e7cf8b0bd8 100644
--- a/net/bluetooth/lib.c
+++ b/net/bluetooth/lib.c
@@ -59,7 +59,7 @@ char *batostr(bdaddr_t *ba)
59EXPORT_SYMBOL(batostr); 59EXPORT_SYMBOL(batostr);
60 60
61/* Bluetooth error codes to Unix errno mapping */ 61/* Bluetooth error codes to Unix errno mapping */
62int bt_err(__u16 code) 62int 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}
152EXPORT_SYMBOL(bt_err); 152EXPORT_SYMBOL(bt_to_errno);
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index cb4fb7837e5..4c3621b5e0a 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}