]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
HID: make device_attribute const
authorBhumika Goyal <bhumirks@gmail.com>
Mon, 21 Aug 2017 11:43:09 +0000 (17:13 +0530)
committerJiri Kosina <jkosina@suse.cz>
Wed, 6 Sep 2017 08:57:18 +0000 (10:57 +0200)
Make this const as it is only passed as an argument to the function
device_create_file and device_remove_file and the corresponding arguments are
of type const.  Done using Coccinelle

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c

index 9bc91160819b6eaeac1b0368bdbdfe15a1328422..24e929cbf0e809b9d738dca71a5998dc202fb1ec 100644 (file)
@@ -1662,7 +1662,7 @@ static struct bin_attribute dev_bin_attr_report_desc = {
        .size = HID_MAX_DESCRIPTOR_SIZE,
 };
 
-static struct device_attribute dev_attr_country = {
+static const struct device_attribute dev_attr_country = {
        .attr = { .name = "country", .mode = 0444 },
        .show = show_country,
 };