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>
This commit is contained in:
parent
942ecc9c46
commit
e175072f37
@ -204,7 +204,7 @@ out:
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bt_err(__u16 code);
|
int bt_to_errno(__u16 code);
|
||||||
|
|
||||||
extern int hci_sock_init(void);
|
extern int hci_sock_init(void);
|
||||||
extern void hci_sock_cleanup(void);
|
extern void hci_sock_cleanup(void);
|
||||||
|
@ -148,7 +148,7 @@ static int __hci_request(struct hci_dev *hdev, void (*req)(struct hci_dev *hdev,
|
|||||||
|
|
||||||
switch (hdev->req_status) {
|
switch (hdev->req_status) {
|
||||||
case HCI_REQ_DONE:
|
case HCI_REQ_DONE:
|
||||||
err = -bt_err(hdev->req_result);
|
err = -bt_to_errno(hdev->req_result);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HCI_REQ_CANCELED:
|
case HCI_REQ_CANCELED:
|
||||||
|
@ -4107,7 +4107,7 @@ static int l2cap_connect_cfm(struct hci_conn *hcon, u8 status)
|
|||||||
if (conn)
|
if (conn)
|
||||||
l2cap_conn_ready(conn);
|
l2cap_conn_ready(conn);
|
||||||
} else
|
} else
|
||||||
l2cap_conn_del(hcon, bt_err(status));
|
l2cap_conn_del(hcon, bt_to_errno(status));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -4131,7 +4131,7 @@ static int l2cap_disconn_cfm(struct hci_conn *hcon, u8 reason)
|
|||||||
if (!(hcon->type == ACL_LINK || hcon->type == LE_LINK))
|
if (!(hcon->type == ACL_LINK || hcon->type == LE_LINK))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
l2cap_conn_del(hcon, bt_err(reason));
|
l2cap_conn_del(hcon, bt_to_errno(reason));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ char *batostr(bdaddr_t *ba)
|
|||||||
EXPORT_SYMBOL(batostr);
|
EXPORT_SYMBOL(batostr);
|
||||||
|
|
||||||
/* Bluetooth error codes to Unix errno mapping */
|
/* Bluetooth error codes to Unix errno mapping */
|
||||||
int bt_err(__u16 code)
|
int bt_to_errno(__u16 code)
|
||||||
{
|
{
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -149,4 +149,4 @@ int bt_err(__u16 code)
|
|||||||
return ENOSYS;
|
return ENOSYS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(bt_err);
|
EXPORT_SYMBOL(bt_to_errno);
|
||||||
|
@ -932,7 +932,7 @@ static int sco_connect_cfm(struct hci_conn *hcon, __u8 status)
|
|||||||
if (conn)
|
if (conn)
|
||||||
sco_conn_ready(conn);
|
sco_conn_ready(conn);
|
||||||
} else
|
} else
|
||||||
sco_conn_del(hcon, bt_err(status));
|
sco_conn_del(hcon, bt_to_errno(status));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -944,7 +944,7 @@ static int sco_disconn_cfm(struct hci_conn *hcon, __u8 reason)
|
|||||||
if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK)
|
if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
sco_conn_del(hcon, bt_err(reason));
|
sco_conn_del(hcon, bt_to_errno(reason));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user