diff options
author | Gustavo F. Padovan <padovan@profusion.mobi> | 2010-07-24 01:04:45 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-07-27 15:37:27 -0400 |
commit | 2f8362afcd2da8b313ec3cc04a50af19d3592972 (patch) | |
tree | c4fe061e063d399c73a08e3fef7864fb4fe36a72 /net/bluetooth/rfcomm | |
parent | f2b94bb9e0b8bd048331a6e9d616e918f4bcbd97 (diff) |
Bluetooth: Add __init and __exit marks to RFCOMM
Those annotation save memory and space on the binary. __init code is
discarded just after execute and __exit code is discarded if the module
is built into the kernel image or unload of modules is not allowed.
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/rfcomm')
-rw-r--r-- | net/bluetooth/rfcomm/sock.c | 2 | ||||
-rw-r--r-- | net/bluetooth/rfcomm/tty.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c index 43fbf6b4b4bf..44a623275951 100644 --- a/net/bluetooth/rfcomm/sock.c +++ b/net/bluetooth/rfcomm/sock.c | |||
@@ -1152,7 +1152,7 @@ error: | |||
1152 | return err; | 1152 | return err; |
1153 | } | 1153 | } |
1154 | 1154 | ||
1155 | void rfcomm_cleanup_sockets(void) | 1155 | void __exit rfcomm_cleanup_sockets(void) |
1156 | { | 1156 | { |
1157 | debugfs_remove(rfcomm_sock_debugfs); | 1157 | debugfs_remove(rfcomm_sock_debugfs); |
1158 | 1158 | ||
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index 309b6c261b25..026205c18b78 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c | |||
@@ -1153,7 +1153,7 @@ static const struct tty_operations rfcomm_ops = { | |||
1153 | .tiocmset = rfcomm_tty_tiocmset, | 1153 | .tiocmset = rfcomm_tty_tiocmset, |
1154 | }; | 1154 | }; |
1155 | 1155 | ||
1156 | int rfcomm_init_ttys(void) | 1156 | int __init rfcomm_init_ttys(void) |
1157 | { | 1157 | { |
1158 | rfcomm_tty_driver = alloc_tty_driver(RFCOMM_TTY_PORTS); | 1158 | rfcomm_tty_driver = alloc_tty_driver(RFCOMM_TTY_PORTS); |
1159 | if (!rfcomm_tty_driver) | 1159 | if (!rfcomm_tty_driver) |
@@ -1183,7 +1183,7 @@ int rfcomm_init_ttys(void) | |||
1183 | return 0; | 1183 | return 0; |
1184 | } | 1184 | } |
1185 | 1185 | ||
1186 | void rfcomm_cleanup_ttys(void) | 1186 | void __exit rfcomm_cleanup_ttys(void) |
1187 | { | 1187 | { |
1188 | tty_unregister_driver(rfcomm_tty_driver); | 1188 | tty_unregister_driver(rfcomm_tty_driver); |
1189 | put_tty_driver(rfcomm_tty_driver); | 1189 | put_tty_driver(rfcomm_tty_driver); |