Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
05b9ae6f
Commit
05b9ae6f
authored
Feb 19, 2003
by
Maksim Krasnyanskiy
Committed by
Marcel Holtmann
Feb 19, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bluetooth]
Cleanup and fix __init and __exit functions. /proc/bluetooth initialization fixes.
parent
a1ba2826
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
41 additions
and
34 deletions
+41
-34
net/bluetooth/af_bluetooth.c
net/bluetooth/af_bluetooth.c
+3
-1
net/bluetooth/bnep/core.c
net/bluetooth/bnep/core.c
+1
-1
net/bluetooth/bnep/sock.c
net/bluetooth/bnep/sock.c
+2
-2
net/bluetooth/hci_proc.c
net/bluetooth/hci_proc.c
+3
-3
net/bluetooth/hci_sock.c
net/bluetooth/hci_sock.c
+2
-2
net/bluetooth/l2cap.c
net/bluetooth/l2cap.c
+6
-5
net/bluetooth/rfcomm/core.c
net/bluetooth/rfcomm/core.c
+12
-9
net/bluetooth/rfcomm/sock.c
net/bluetooth/rfcomm/sock.c
+6
-6
net/bluetooth/sco.c
net/bluetooth/sco.c
+6
-5
No files found.
net/bluetooth/af_bluetooth.c
View file @
05b9ae6f
...
@@ -335,6 +335,8 @@ static int __init bt_init(void)
...
@@ -335,6 +335,8 @@ static int __init bt_init(void)
BT_INFO
(
"Core ver %s"
,
VERSION
);
BT_INFO
(
"Core ver %s"
,
VERSION
);
proc_bt
=
proc_mkdir
(
"bluetooth"
,
NULL
);
proc_bt
=
proc_mkdir
(
"bluetooth"
,
NULL
);
if
(
proc_bt
)
proc_bt
->
owner
=
THIS_MODULE
;
/* Init socket cache */
/* Init socket cache */
bt_sock_cache
=
kmem_cache_create
(
"bt_sock"
,
bt_sock_cache
=
kmem_cache_create
(
"bt_sock"
,
...
...
net/bluetooth/bnep/core.c
View file @
05b9ae6f
net/bluetooth/bnep/sock.c
View file @
05b9ae6f
...
@@ -192,13 +192,13 @@ static struct net_proto_family bnep_sock_family_ops = {
...
@@ -192,13 +192,13 @@ static struct net_proto_family bnep_sock_family_ops = {
.
create
=
bnep_sock_create
.
create
=
bnep_sock_create
};
};
int
bnep_sock_init
(
void
)
int
__init
bnep_sock_init
(
void
)
{
{
bt_sock_register
(
BTPROTO_BNEP
,
&
bnep_sock_family_ops
);
bt_sock_register
(
BTPROTO_BNEP
,
&
bnep_sock_family_ops
);
return
0
;
return
0
;
}
}
int
bnep_sock_cleanup
(
void
)
int
__exit
bnep_sock_cleanup
(
void
)
{
{
if
(
bt_sock_unregister
(
BTPROTO_BNEP
))
if
(
bt_sock_unregister
(
BTPROTO_BNEP
))
BT_ERR
(
"Can't unregister BNEP socket"
);
BT_ERR
(
"Can't unregister BNEP socket"
);
...
...
net/bluetooth/hci_proc.c
View file @
05b9ae6f
...
@@ -157,7 +157,7 @@ int __init hci_proc_init(void)
...
@@ -157,7 +157,7 @@ int __init hci_proc_init(void)
return
0
;
return
0
;
}
}
void
__
in
it
hci_proc_cleanup
(
void
)
void
__
ex
it
hci_proc_cleanup
(
void
)
{
{
remove_proc_entry
(
"hci"
,
proc_bt
);
remove_proc_entry
(
"hci"
,
proc_bt
);
}
}
...
@@ -179,7 +179,7 @@ int __init hci_proc_init(void)
...
@@ -179,7 +179,7 @@ int __init hci_proc_init(void)
return
0
;
return
0
;
}
}
void
__
in
it
hci_proc_cleanup
(
void
)
void
__
ex
it
hci_proc_cleanup
(
void
)
{
{
return
;
return
;
}
}
...
...
net/bluetooth/hci_sock.c
View file @
05b9ae6f
...
@@ -625,7 +625,7 @@ struct notifier_block hci_sock_nblock = {
...
@@ -625,7 +625,7 @@ struct notifier_block hci_sock_nblock = {
.
notifier_call
=
hci_sock_dev_event
.
notifier_call
=
hci_sock_dev_event
};
};
int
hci_sock_init
(
void
)
int
__init
hci_sock_init
(
void
)
{
{
if
(
bt_sock_register
(
BTPROTO_HCI
,
&
hci_sock_family_ops
))
{
if
(
bt_sock_register
(
BTPROTO_HCI
,
&
hci_sock_family_ops
))
{
BT_ERR
(
"HCI socket registration failed"
);
BT_ERR
(
"HCI socket registration failed"
);
...
@@ -639,7 +639,7 @@ int hci_sock_init(void)
...
@@ -639,7 +639,7 @@ int hci_sock_init(void)
return
0
;
return
0
;
}
}
int
hci_sock_cleanup
(
void
)
int
__exit
hci_sock_cleanup
(
void
)
{
{
if
(
bt_sock_unregister
(
BTPROTO_HCI
))
if
(
bt_sock_unregister
(
BTPROTO_HCI
))
BT_ERR
(
"HCI socket unregistration failed"
);
BT_ERR
(
"HCI socket unregistration failed"
);
...
...
net/bluetooth/l2cap.c
View file @
05b9ae6f
...
@@ -2059,11 +2059,12 @@ static int __init l2cap_proc_init(void)
...
@@ -2059,11 +2059,12 @@ static int __init l2cap_proc_init(void)
struct
proc_dir_entry
*
p
=
create_proc_entry
(
"l2cap"
,
S_IRUGO
,
proc_bt
);
struct
proc_dir_entry
*
p
=
create_proc_entry
(
"l2cap"
,
S_IRUGO
,
proc_bt
);
if
(
!
p
)
if
(
!
p
)
return
-
ENOMEM
;
return
-
ENOMEM
;
p
->
owner
=
THIS_MODULE
;
p
->
proc_fops
=
&
l2cap_seq_fops
;
p
->
proc_fops
=
&
l2cap_seq_fops
;
return
0
;
return
0
;
}
}
static
void
__
in
it
l2cap_proc_cleanup
(
void
)
static
void
__
ex
it
l2cap_proc_cleanup
(
void
)
{
{
remove_proc_entry
(
"l2cap"
,
proc_bt
);
remove_proc_entry
(
"l2cap"
,
proc_bt
);
}
}
...
@@ -2075,7 +2076,7 @@ static int __init l2cap_proc_init(void)
...
@@ -2075,7 +2076,7 @@ static int __init l2cap_proc_init(void)
return
0
;
return
0
;
}
}
static
void
__
in
it
l2cap_proc_cleanup
(
void
)
static
void
__
ex
it
l2cap_proc_cleanup
(
void
)
{
{
return
;
return
;
}
}
...
@@ -2139,7 +2140,7 @@ int __init l2cap_init(void)
...
@@ -2139,7 +2140,7 @@ int __init l2cap_init(void)
return
0
;
return
0
;
}
}
void
l2cap_cleanup
(
void
)
void
__exit
l2cap_cleanup
(
void
)
{
{
l2cap_proc_cleanup
();
l2cap_proc_cleanup
();
...
...
net/bluetooth/rfcomm/core.c
View file @
05b9ae6f
...
@@ -1808,14 +1808,17 @@ static int __init rfcomm_proc_init(void)
...
@@ -1808,14 +1808,17 @@ static int __init rfcomm_proc_init(void)
struct
proc_dir_entry
*
p
;
struct
proc_dir_entry
*
p
;
proc_bt_rfcomm
=
proc_mkdir
(
"rfcomm"
,
proc_bt
);
proc_bt_rfcomm
=
proc_mkdir
(
"rfcomm"
,
proc_bt
);
if
(
proc_bt_rfcomm
)
{
proc_bt_rfcomm
->
owner
=
THIS_MODULE
;
p
=
create_proc_entry
(
"dlc"
,
S_IRUGO
,
proc_bt_rfcomm
);
p
=
create_proc_entry
(
"dlc"
,
S_IRUGO
,
proc_bt_rfcomm
);
if
(
p
)
if
(
p
)
p
->
proc_fops
=
&
rfcomm_seq_fops
;
p
->
proc_fops
=
&
rfcomm_seq_fops
;
}
return
0
;
return
0
;
}
}
static
void
__
in
it
rfcomm_proc_cleanup
(
void
)
static
void
__
ex
it
rfcomm_proc_cleanup
(
void
)
{
{
remove_proc_entry
(
"dlc"
,
proc_bt_rfcomm
);
remove_proc_entry
(
"dlc"
,
proc_bt_rfcomm
);
...
@@ -1829,7 +1832,7 @@ static int __init rfcomm_proc_init(void)
...
@@ -1829,7 +1832,7 @@ static int __init rfcomm_proc_init(void)
return
0
;
return
0
;
}
}
static
void
__
in
it
rfcomm_proc_cleanup
(
void
)
static
void
__
ex
it
rfcomm_proc_cleanup
(
void
)
{
{
return
;
return
;
}
}
...
@@ -1853,7 +1856,7 @@ int __init rfcomm_init(void)
...
@@ -1853,7 +1856,7 @@ int __init rfcomm_init(void)
return
0
;
return
0
;
}
}
void
rfcomm_cleanup
(
void
)
void
__exit
rfcomm_cleanup
(
void
)
{
{
/* Terminate working thread.
/* Terminate working thread.
* ie. Set terminate flag and wake it up */
* ie. Set terminate flag and wake it up */
...
...
net/bluetooth/rfcomm/sock.c
View file @
05b9ae6f
...
@@ -837,7 +837,7 @@ static int __init rfcomm_sock_proc_init(void)
...
@@ -837,7 +837,7 @@ static int __init rfcomm_sock_proc_init(void)
return
0
;
return
0
;
}
}
static
void
__
in
it
rfcomm_sock_proc_cleanup
(
void
)
static
void
__
ex
it
rfcomm_sock_proc_cleanup
(
void
)
{
{
remove_proc_entry
(
"sock"
,
proc_bt_rfcomm
);
remove_proc_entry
(
"sock"
,
proc_bt_rfcomm
);
}
}
...
@@ -849,7 +849,7 @@ static int __init rfcomm_sock_proc_init(void)
...
@@ -849,7 +849,7 @@ static int __init rfcomm_sock_proc_init(void)
return
0
;
return
0
;
}
}
static
void
__
in
it
rfcomm_sock_proc_cleanup
(
void
)
static
void
__
ex
it
rfcomm_sock_proc_cleanup
(
void
)
{
{
return
;
return
;
}
}
...
@@ -879,7 +879,7 @@ static struct net_proto_family rfcomm_sock_family_ops = {
...
@@ -879,7 +879,7 @@ static struct net_proto_family rfcomm_sock_family_ops = {
.
create
=
rfcomm_sock_create
.
create
=
rfcomm_sock_create
};
};
int
rfcomm_init_sockets
(
void
)
int
__init
rfcomm_init_sockets
(
void
)
{
{
int
err
;
int
err
;
...
@@ -894,7 +894,7 @@ int rfcomm_init_sockets(void)
...
@@ -894,7 +894,7 @@ int rfcomm_init_sockets(void)
return
0
;
return
0
;
}
}
void
rfcomm_cleanup_sockets
(
void
)
void
__exit
rfcomm_cleanup_sockets
(
void
)
{
{
int
err
;
int
err
;
...
...
net/bluetooth/sco.c
View file @
05b9ae6f
...
@@ -944,11 +944,12 @@ static int __init sco_proc_init(void)
...
@@ -944,11 +944,12 @@ static int __init sco_proc_init(void)
struct
proc_dir_entry
*
p
=
create_proc_entry
(
"sco"
,
S_IRUGO
,
proc_bt
);
struct
proc_dir_entry
*
p
=
create_proc_entry
(
"sco"
,
S_IRUGO
,
proc_bt
);
if
(
!
p
)
if
(
!
p
)
return
-
ENOMEM
;
return
-
ENOMEM
;
p
->
owner
=
THIS_MODULE
;
p
->
proc_fops
=
&
sco_seq_fops
;
p
->
proc_fops
=
&
sco_seq_fops
;
return
0
;
return
0
;
}
}
static
void
__
in
it
sco_proc_cleanup
(
void
)
static
void
__
ex
it
sco_proc_cleanup
(
void
)
{
{
remove_proc_entry
(
"sco"
,
proc_bt
);
remove_proc_entry
(
"sco"
,
proc_bt
);
}
}
...
@@ -960,7 +961,7 @@ static int __init sco_proc_init(void)
...
@@ -960,7 +961,7 @@ static int __init sco_proc_init(void)
return
0
;
return
0
;
}
}
static
void
__
in
it
sco_proc_cleanup
(
void
)
static
void
__
ex
it
sco_proc_cleanup
(
void
)
{
{
return
;
return
;
}
}
...
@@ -1021,7 +1022,7 @@ int __init sco_init(void)
...
@@ -1021,7 +1022,7 @@ int __init sco_init(void)
return
0
;
return
0
;
}
}
void
sco_cleanup
(
void
)
void
__exit
sco_cleanup
(
void
)
{
{
int
err
;
int
err
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment