diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2016-08-29 23:00:35 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2016-09-19 14:19:34 -0400 |
commit | 9e8305b39bfa23a83b932007654097f4676c2ba2 (patch) | |
tree | a210480cb146003a6fd0b3e316d343289e8922fe /net/bluetooth | |
parent | df1cb87af9f24527a8932e4d195d49ffab1168d2 (diff) |
Bluetooth: Use numbers for subsystem version string
Instead of keeping a version string around, use version and revision
numbers and then stringify them for use as module parameter.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/af_bluetooth.c | 10 | ||||
-rw-r--r-- | net/bluetooth/hci_sock.c | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c index 1d96ff3a8d87..1aff2da9bc74 100644 --- a/net/bluetooth/af_bluetooth.c +++ b/net/bluetooth/af_bluetooth.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/debugfs.h> | 28 | #include <linux/debugfs.h> |
29 | #include <linux/stringify.h> | ||
29 | #include <asm/ioctls.h> | 30 | #include <asm/ioctls.h> |
30 | 31 | ||
31 | #include <net/bluetooth/bluetooth.h> | 32 | #include <net/bluetooth/bluetooth.h> |
@@ -713,13 +714,16 @@ static struct net_proto_family bt_sock_family_ops = { | |||
713 | struct dentry *bt_debugfs; | 714 | struct dentry *bt_debugfs; |
714 | EXPORT_SYMBOL_GPL(bt_debugfs); | 715 | EXPORT_SYMBOL_GPL(bt_debugfs); |
715 | 716 | ||
717 | #define VERSION __stringify(BT_SUBSYS_VERSION) "." \ | ||
718 | __stringify(BT_SUBSYS_REVISION) | ||
719 | |||
716 | static int __init bt_init(void) | 720 | static int __init bt_init(void) |
717 | { | 721 | { |
718 | int err; | 722 | int err; |
719 | 723 | ||
720 | sock_skb_cb_check_size(sizeof(struct bt_skb_cb)); | 724 | sock_skb_cb_check_size(sizeof(struct bt_skb_cb)); |
721 | 725 | ||
722 | BT_INFO("Core ver %s", BT_SUBSYS_VERSION); | 726 | BT_INFO("Core ver %s", VERSION); |
723 | 727 | ||
724 | err = bt_selftest(); | 728 | err = bt_selftest(); |
725 | if (err < 0) | 729 | if (err < 0) |
@@ -797,7 +801,7 @@ subsys_initcall(bt_init); | |||
797 | module_exit(bt_exit); | 801 | module_exit(bt_exit); |
798 | 802 | ||
799 | MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); | 803 | MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); |
800 | MODULE_DESCRIPTION("Bluetooth Core ver " BT_SUBSYS_VERSION); | 804 | MODULE_DESCRIPTION("Bluetooth Core ver " VERSION); |
801 | MODULE_VERSION(BT_SUBSYS_VERSION); | 805 | MODULE_VERSION(VERSION); |
802 | MODULE_LICENSE("GPL"); | 806 | MODULE_LICENSE("GPL"); |
803 | MODULE_ALIAS_NETPROTO(PF_BLUETOOTH); | 807 | MODULE_ALIAS_NETPROTO(PF_BLUETOOTH); |
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 804208d48368..a4227c777d16 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c | |||
@@ -1117,8 +1117,8 @@ static int hci_sock_bind(struct socket *sock, struct sockaddr *addr, | |||
1117 | send_monitor_note(sk, "Linux version %s (%s)", | 1117 | send_monitor_note(sk, "Linux version %s (%s)", |
1118 | init_utsname()->release, | 1118 | init_utsname()->release, |
1119 | init_utsname()->machine); | 1119 | init_utsname()->machine); |
1120 | send_monitor_note(sk, "Bluetooth subsystem version %s", | 1120 | send_monitor_note(sk, "Bluetooth subsystem version %u.%u", |
1121 | BT_SUBSYS_VERSION); | 1121 | BT_SUBSYS_VERSION, BT_SUBSYS_REVISION); |
1122 | send_monitor_replay(sk); | 1122 | send_monitor_replay(sk); |
1123 | send_monitor_control_replay(sk); | 1123 | send_monitor_control_replay(sk); |
1124 | 1124 | ||