Bluetooth: make device_type const
authorBhumika Goyal <bhumirks@gmail.com>
Sat, 19 Aug 2017 09:24:47 +0000 (14:54 +0530)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 19 Aug 2017 09:55:31 +0000 (11:55 +0200)
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>
net/bluetooth/hci_sysfs.c

index ca7a35ebaefb61095f278106adc8d5529a247d31..aa300f3a0d51bda11c13766abbc536e33f2e0a2d 100644 (file)
@@ -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,
 };
@@ -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,
 };