Bluetooth: Rename function bt_err to bt_to_errno
authorJoe Perches <joe@perches.com>
Thu, 30 Jun 2011 01:18:29 +0000 (18:18 -0700)
committerJaikumar Ganesh <jaikumar@google.com>
Mon, 11 Jul 2011 18:59:26 +0000 (11:59 -0700)
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>
include/net/bluetooth/bluetooth.h
net/bluetooth/hci_core.c
net/bluetooth/l2cap_core.c
net/bluetooth/lib.c
net/bluetooth/sco.c

index 7bccaf921cab924daed85c0f71d6b342631f5250..7d77545fdd648c7eed41167fe580ac34103b9fb0 100644 (file)
@@ -204,7 +204,7 @@ out:
        return NULL;
 }
 
-int bt_err(__u16 code);
+int bt_to_errno(__u16 code);
 
 extern int hci_sock_init(void);
 extern void hci_sock_cleanup(void);
index 0029e178e52e80202cb4bf35346116d75e64eecc..cd59b849d0556af22e2bbd4848fe36e87f3f618c 100644 (file)
@@ -148,7 +148,7 @@ static int __hci_request(struct hci_dev *hdev, void (*req)(struct hci_dev *hdev,
 
        switch (hdev->req_status) {
        case HCI_REQ_DONE:
-               err = -bt_err(hdev->req_result);
+               err = -bt_to_errno(hdev->req_result);
                break;
 
        case HCI_REQ_CANCELED:
index d3e425de9fe58fa85ff6320e918e2482c8592a7e..1f9364f47b4051f0aaa1e4234b0061738656556e 100644 (file)
@@ -4108,7 +4108,7 @@ static int l2cap_connect_cfm(struct hci_conn *hcon, u8 status)
                if (conn)
                        l2cap_conn_ready(conn);
        } else
-               l2cap_conn_del(hcon, bt_err(status));
+               l2cap_conn_del(hcon, bt_to_errno(status));
 
        return 0;
 }
@@ -4132,7 +4132,7 @@ static int l2cap_disconn_cfm(struct hci_conn *hcon, u8 reason)
        if (!(hcon->type == ACL_LINK || hcon->type == LE_LINK))
                return -EINVAL;
 
-       l2cap_conn_del(hcon, bt_err(reason));
+       l2cap_conn_del(hcon, bt_to_errno(reason));
 
        return 0;
 }
index b826d1bf10df5ce53f9674a061a65e940af73913..4e7cf8b0bd871f4b8a893934e40a30fd62e0a43c 100644 (file)
@@ -59,7 +59,7 @@ char *batostr(bdaddr_t *ba)
 EXPORT_SYMBOL(batostr);
 
 /* Bluetooth error codes to Unix errno mapping */
-int bt_err(__u16 code)
+int bt_to_errno(__u16 code)
 {
        switch (code) {
        case 0:
@@ -149,4 +149,4 @@ int bt_err(__u16 code)
                return ENOSYS;
        }
 }
-EXPORT_SYMBOL(bt_err);
+EXPORT_SYMBOL(bt_to_errno);
index aacaa27f20727cbc618b8c43fe50e4472532be0a..febc83a5c223ad5afc09bf29d050dc9da37371f1 100644 (file)
@@ -948,7 +948,7 @@ static int sco_connect_cfm(struct hci_conn *hcon, __u8 status)
                if (conn)
                        sco_conn_ready(conn);
        } else
-               sco_conn_del(hcon, bt_err(status));
+               sco_conn_del(hcon, bt_to_errno(status));
 
        return 0;
 }
@@ -960,7 +960,7 @@ static int sco_disconn_cfm(struct hci_conn *hcon, __u8 reason)
        if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK)
                return -EINVAL;
 
-       sco_conn_del(hcon, bt_err(reason));
+       sco_conn_del(hcon, bt_to_errno(reason));
 
        return 0;
 }