Commit 412b894a authored by Ricardo B. Marliere's avatar Ricardo B. Marliere Committed by Luiz Augusto von Dentz

Bluetooth: constify the struct device_type usage

Since commit aed65af1 ("drivers: make device_type const"), the driver
core can properly handle constant struct device_type. Move the bt_type and
bnep_type variables to be constant structures as well, placing it into
read-only memory which can not be modified at runtime.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarRicardo B. Marliere <ricardo@marliere.net>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent f9183eaa
......@@ -572,7 +572,7 @@ static void netdev_setup(struct net_device *dev)
dev->needs_free_netdev = true;
}
static struct device_type bt_type = {
static const struct device_type bt_type = {
.name = "bluetooth",
};
......
......@@ -549,7 +549,7 @@ static struct device *bnep_get_device(struct bnep_session *session)
return &conn->hcon->dev;
}
static struct device_type bnep_type = {
static const struct device_type bnep_type = {
.name = "bluetooth",
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment