Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e8305b3 authored by Marcel Holtmann's avatar Marcel Holtmann
Browse files

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: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent df1cb87a
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -29,7 +29,8 @@
#include <net/sock.h>
#include <net/sock.h>
#include <linux/seq_file.h>
#include <linux/seq_file.h>


#define BT_SUBSYS_VERSION "2.21"
#define BT_SUBSYS_VERSION	2
#define BT_SUBSYS_REVISION	21


#ifndef AF_BLUETOOTH
#ifndef AF_BLUETOOTH
#define AF_BLUETOOTH	31
#define AF_BLUETOOTH	31
+7 −3
Original line number Original line Diff line number Diff line
@@ -26,6 +26,7 @@


#include <linux/module.h>
#include <linux/module.h>
#include <linux/debugfs.h>
#include <linux/debugfs.h>
#include <linux/stringify.h>
#include <asm/ioctls.h>
#include <asm/ioctls.h>


#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/bluetooth.h>
@@ -713,13 +714,16 @@ static struct net_proto_family bt_sock_family_ops = {
struct dentry *bt_debugfs;
struct dentry *bt_debugfs;
EXPORT_SYMBOL_GPL(bt_debugfs);
EXPORT_SYMBOL_GPL(bt_debugfs);


#define VERSION __stringify(BT_SUBSYS_VERSION) "." \
		__stringify(BT_SUBSYS_REVISION)

static int __init bt_init(void)
static int __init bt_init(void)
{
{
	int err;
	int err;


	sock_skb_cb_check_size(sizeof(struct bt_skb_cb));
	sock_skb_cb_check_size(sizeof(struct bt_skb_cb));


	BT_INFO("Core ver %s", BT_SUBSYS_VERSION);
	BT_INFO("Core ver %s", VERSION);


	err = bt_selftest();
	err = bt_selftest();
	if (err < 0)
	if (err < 0)
@@ -797,7 +801,7 @@ subsys_initcall(bt_init);
module_exit(bt_exit);
module_exit(bt_exit);


MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
MODULE_DESCRIPTION("Bluetooth Core ver " BT_SUBSYS_VERSION);
MODULE_DESCRIPTION("Bluetooth Core ver " VERSION);
MODULE_VERSION(BT_SUBSYS_VERSION);
MODULE_VERSION(VERSION);
MODULE_LICENSE("GPL");
MODULE_LICENSE("GPL");
MODULE_ALIAS_NETPROTO(PF_BLUETOOTH);
MODULE_ALIAS_NETPROTO(PF_BLUETOOTH);
+2 −2
Original line number Original line Diff line number Diff line
@@ -1117,8 +1117,8 @@ static int hci_sock_bind(struct socket *sock, struct sockaddr *addr,
		send_monitor_note(sk, "Linux version %s (%s)",
		send_monitor_note(sk, "Linux version %s (%s)",
				  init_utsname()->release,
				  init_utsname()->release,
				  init_utsname()->machine);
				  init_utsname()->machine);
		send_monitor_note(sk, "Bluetooth subsystem version %s",
		send_monitor_note(sk, "Bluetooth subsystem version %u.%u",
				  BT_SUBSYS_VERSION);
				  BT_SUBSYS_VERSION, BT_SUBSYS_REVISION);
		send_monitor_replay(sk);
		send_monitor_replay(sk);
		send_monitor_control_replay(sk);
		send_monitor_control_replay(sk);