diff options
Diffstat (limited to 'net/bluetooth/af_bluetooth.c')
| -rw-r--r-- | net/bluetooth/af_bluetooth.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c index 51f867062e1d..788ea7a2b744 100644 --- a/net/bluetooth/af_bluetooth.c +++ b/net/bluetooth/af_bluetooth.c | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | #define BT_DBG(D...) | 48 | #define BT_DBG(D...) |
| 49 | #endif | 49 | #endif |
| 50 | 50 | ||
| 51 | #define VERSION "2.8" | 51 | #define VERSION "2.10" |
| 52 | 52 | ||
| 53 | /* Bluetooth sockets */ | 53 | /* Bluetooth sockets */ |
| 54 | #define BT_MAX_PROTO 8 | 54 | #define BT_MAX_PROTO 8 |
| @@ -307,13 +307,21 @@ static struct net_proto_family bt_sock_family_ops = { | |||
| 307 | 307 | ||
| 308 | static int __init bt_init(void) | 308 | static int __init bt_init(void) |
| 309 | { | 309 | { |
| 310 | int err; | ||
| 311 | |||
| 310 | BT_INFO("Core ver %s", VERSION); | 312 | BT_INFO("Core ver %s", VERSION); |
| 311 | 313 | ||
| 312 | sock_register(&bt_sock_family_ops); | 314 | err = bt_sysfs_init(); |
| 315 | if (err < 0) | ||
| 316 | return err; | ||
| 313 | 317 | ||
| 314 | BT_INFO("HCI device and connection manager initialized"); | 318 | err = sock_register(&bt_sock_family_ops); |
| 319 | if (err < 0) { | ||
| 320 | bt_sysfs_cleanup(); | ||
| 321 | return err; | ||
| 322 | } | ||
| 315 | 323 | ||
| 316 | bt_sysfs_init(); | 324 | BT_INFO("HCI device and connection manager initialized"); |
| 317 | 325 | ||
| 318 | hci_sock_init(); | 326 | hci_sock_init(); |
| 319 | 327 | ||
| @@ -324,9 +332,9 @@ static void __exit bt_exit(void) | |||
| 324 | { | 332 | { |
| 325 | hci_sock_cleanup(); | 333 | hci_sock_cleanup(); |
| 326 | 334 | ||
| 327 | bt_sysfs_cleanup(); | ||
| 328 | |||
| 329 | sock_unregister(PF_BLUETOOTH); | 335 | sock_unregister(PF_BLUETOOTH); |
| 336 | |||
| 337 | bt_sysfs_cleanup(); | ||
| 330 | } | 338 | } |
| 331 | 339 | ||
| 332 | subsys_initcall(bt_init); | 340 | subsys_initcall(bt_init); |
