Thread (46 messages) 46 messages, 4 authors, 2012-08-15
STALE5091d

[PATCH v3 8/8] bluetooth: Added /proc/net/sco via bt_procfs_init()

From: Masatake YAMATO <hidden>
Date: 2012-07-11 05:04:29
Also in: lkml
Subsystem: bluetooth subsystem, the rest · Maintainers: Marcel Holtmann, Luiz Augusto von Dentz, Linus Torvalds

Signed-off-by: Masatake YAMATO <redacted>
---
 net/bluetooth/sco.c |    9 +++++++++
 1 file changed, 9 insertions(+)
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 40bbe25..85efd9f 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -1026,6 +1026,13 @@ int __init sco_init(void)
 		goto error;
 	}
 
+	err = bt_procfs_init(THIS_MODULE, &init_net, "sco", &sco_sk_list, NULL);
+	if (err < 0) {
+		BT_ERR("Failed to create SCO proc file");
+		bt_sock_unregister(BTPROTO_SCO);
+		goto error;
+	}
+
 	if (bt_debugfs) {
 		sco_debugfs = debugfs_create_file("sco", 0444, bt_debugfs,
 						  NULL, &sco_debugfs_fops);
@@ -1044,6 +1051,8 @@ error:
 
 void __exit sco_exit(void)
 {
+	bt_procfs_cleanup(&init_net, "sco");
+
 	debugfs_remove(sco_debugfs);
 
 	if (bt_sock_unregister(BTPROTO_SCO) < 0)
-- 
1.7.10.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help