diff options
Diffstat (limited to 'net/bluetooth/sco.c')
-rw-r--r-- | net/bluetooth/sco.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 3589e21edb09..dc42b917aaaf 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c | |||
@@ -912,7 +912,7 @@ int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr) | |||
912 | return lm; | 912 | return lm; |
913 | } | 913 | } |
914 | 914 | ||
915 | int sco_connect_cfm(struct hci_conn *hcon, __u8 status) | 915 | void sco_connect_cfm(struct hci_conn *hcon, __u8 status) |
916 | { | 916 | { |
917 | BT_DBG("hcon %p bdaddr %s status %d", hcon, batostr(&hcon->dst), status); | 917 | BT_DBG("hcon %p bdaddr %s status %d", hcon, batostr(&hcon->dst), status); |
918 | if (!status) { | 918 | if (!status) { |
@@ -923,16 +923,13 @@ int sco_connect_cfm(struct hci_conn *hcon, __u8 status) | |||
923 | sco_conn_ready(conn); | 923 | sco_conn_ready(conn); |
924 | } else | 924 | } else |
925 | sco_conn_del(hcon, bt_to_errno(status)); | 925 | sco_conn_del(hcon, bt_to_errno(status)); |
926 | |||
927 | return 0; | ||
928 | } | 926 | } |
929 | 927 | ||
930 | int sco_disconn_cfm(struct hci_conn *hcon, __u8 reason) | 928 | void sco_disconn_cfm(struct hci_conn *hcon, __u8 reason) |
931 | { | 929 | { |
932 | BT_DBG("hcon %p reason %d", hcon, reason); | 930 | BT_DBG("hcon %p reason %d", hcon, reason); |
933 | 931 | ||
934 | sco_conn_del(hcon, bt_to_errno(reason)); | 932 | sco_conn_del(hcon, bt_to_errno(reason)); |
935 | return 0; | ||
936 | } | 933 | } |
937 | 934 | ||
938 | int sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb) | 935 | int sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb) |
@@ -1025,6 +1022,13 @@ int __init sco_init(void) | |||
1025 | goto error; | 1022 | goto error; |
1026 | } | 1023 | } |
1027 | 1024 | ||
1025 | err = bt_procfs_init(THIS_MODULE, &init_net, "sco", &sco_sk_list, NULL); | ||
1026 | if (err < 0) { | ||
1027 | BT_ERR("Failed to create SCO proc file"); | ||
1028 | bt_sock_unregister(BTPROTO_SCO); | ||
1029 | goto error; | ||
1030 | } | ||
1031 | |||
1028 | if (bt_debugfs) { | 1032 | if (bt_debugfs) { |
1029 | sco_debugfs = debugfs_create_file("sco", 0444, bt_debugfs, | 1033 | sco_debugfs = debugfs_create_file("sco", 0444, bt_debugfs, |
1030 | NULL, &sco_debugfs_fops); | 1034 | NULL, &sco_debugfs_fops); |
@@ -1043,6 +1047,8 @@ error: | |||
1043 | 1047 | ||
1044 | void __exit sco_exit(void) | 1048 | void __exit sco_exit(void) |
1045 | { | 1049 | { |
1050 | bt_procfs_cleanup(&init_net, "sco"); | ||
1051 | |||
1046 | debugfs_remove(sco_debugfs); | 1052 | debugfs_remove(sco_debugfs); |
1047 | 1053 | ||
1048 | if (bt_sock_unregister(BTPROTO_SCO) < 0) | 1054 | if (bt_sock_unregister(BTPROTO_SCO) < 0) |