ACPI: BGRT: constify attribute_group structures
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Fri, 30 Jun 2017 12:36:34 +0000 (18:06 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 4 Jul 2017 20:15:20 +0000 (22:15 +0200)
attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by <linux/sysfs.h> work with const
attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/bgrt.c

index df1c629205e7b9c477c173351580b049446f8706..75af78361ce5bd72a1305b2318aa7f3b728c367c 100644 (file)
@@ -76,7 +76,7 @@ static struct bin_attribute *bgrt_bin_attributes[] = {
        NULL,
 };
 
-static struct attribute_group bgrt_attribute_group = {
+static const struct attribute_group bgrt_attribute_group = {
        .attrs = bgrt_attributes,
        .bin_attrs = bgrt_bin_attributes,
 };