aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2016-08-29 23:00:35 -0400
committerMarcel Holtmann <marcel@holtmann.org>2016-09-19 14:19:34 -0400
commit9e8305b39bfa23a83b932007654097f4676c2ba2 (patch)
treea210480cb146003a6fd0b3e316d343289e8922fe /net/bluetooth
parentdf1cb87af9f24527a8932e4d195d49ffab1168d2 (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.c10
-rw-r--r--net/bluetooth/hci_sock.c4
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 = {
713struct dentry *bt_debugfs; 714struct dentry *bt_debugfs;
714EXPORT_SYMBOL_GPL(bt_debugfs); 715EXPORT_SYMBOL_GPL(bt_debugfs);
715 716
717#define VERSION __stringify(BT_SUBSYS_VERSION) "." \
718 __stringify(BT_SUBSYS_REVISION)
719
716static int __init bt_init(void) 720static 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);
797module_exit(bt_exit); 801module_exit(bt_exit);
798 802
799MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); 803MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
800MODULE_DESCRIPTION("Bluetooth Core ver " BT_SUBSYS_VERSION); 804MODULE_DESCRIPTION("Bluetooth Core ver " VERSION);
801MODULE_VERSION(BT_SUBSYS_VERSION); 805MODULE_VERSION(VERSION);
802MODULE_LICENSE("GPL"); 806MODULE_LICENSE("GPL");
803MODULE_ALIAS_NETPROTO(PF_BLUETOOTH); 807MODULE_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