mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-06 14:05:39 +00:00
Bluetooth: constify the struct device_type usage
Since commit aed65af1cc
("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: Ricardo B. Marliere <ricardo@marliere.net>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
f9183eaad9
commit
412b894a18
@ -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",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user