Skip to content

Commit

Permalink
Bluetooth: make device_type const
Browse files Browse the repository at this point in the history
Make these const as they are only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Bhumika Goyal authored and Marcel Holtmann committed Aug 19, 2017
1 parent 01d300c commit 9374bf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/bluetooth/hci_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ static void bt_link_release(struct device *dev)
kfree(conn);
}

static struct device_type bt_link = {
static const struct device_type bt_link = {
.name = "link",
.release = bt_link_release,
};
Expand Down Expand Up @@ -86,7 +86,7 @@ static void bt_host_release(struct device *dev)
module_put(THIS_MODULE);
}

static struct device_type bt_host = {
static const struct device_type bt_host = {
.name = "host",
.release = bt_host_release,
};
Expand Down

0 comments on commit 9374bf1

Please sign in to comment.