提交 2f8362af 编写于 作者: G Gustavo F. Padovan 提交者: Marcel Holtmann

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: NGustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 f2b94bb9
...@@ -1152,7 +1152,7 @@ int __init rfcomm_init_sockets(void) ...@@ -1152,7 +1152,7 @@ int __init rfcomm_init_sockets(void)
return err; return err;
} }
void rfcomm_cleanup_sockets(void) void __exit rfcomm_cleanup_sockets(void)
{ {
debugfs_remove(rfcomm_sock_debugfs); debugfs_remove(rfcomm_sock_debugfs);
......
...@@ -1153,7 +1153,7 @@ static const struct tty_operations rfcomm_ops = { ...@@ -1153,7 +1153,7 @@ static const struct tty_operations rfcomm_ops = {
.tiocmset = rfcomm_tty_tiocmset, .tiocmset = rfcomm_tty_tiocmset,
}; };
int rfcomm_init_ttys(void) int __init rfcomm_init_ttys(void)
{ {
rfcomm_tty_driver = alloc_tty_driver(RFCOMM_TTY_PORTS); rfcomm_tty_driver = alloc_tty_driver(RFCOMM_TTY_PORTS);
if (!rfcomm_tty_driver) if (!rfcomm_tty_driver)
...@@ -1183,7 +1183,7 @@ int rfcomm_init_ttys(void) ...@@ -1183,7 +1183,7 @@ int rfcomm_init_ttys(void)
return 0; return 0;
} }
void rfcomm_cleanup_ttys(void) void __exit rfcomm_cleanup_ttys(void)
{ {
tty_unregister_driver(rfcomm_tty_driver); tty_unregister_driver(rfcomm_tty_driver);
put_tty_driver(rfcomm_tty_driver); put_tty_driver(rfcomm_tty_driver);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册