* [PATCH 8/8] Added /proc/net/sco via bt_procfs_init()
@ 2012-06-14 17:19 Masatake YAMATO
0 siblings, 0 replies; only message in thread
From: Masatake YAMATO @ 2012-06-14 17:19 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-bluetooth
Added /proc/net/sco via bt_procfs_init().
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
---
net/bluetooth/sco.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index cbdd313..4f55867 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -1043,6 +1043,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);
@@ -1061,6 +1068,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.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-06-14 17:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-14 17:19 [PATCH 8/8] Added /proc/net/sco via bt_procfs_init() Masatake YAMATO
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.