]> www.infradead.org Git - linux-platform-drivers-x86.git/commitdiff
ACPI / LPSS: constify attribute_group structures
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Fri, 30 Jun 2017 12:53:50 +0000 (18:23 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 4 Jul 2017 20:15:24 +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/acpi_lpss.c

index 10347e3d73ad00d1cdf25ba462c1659f9638840e..e51a1e98e62f4f5ab5f2132184e9686ab1a1f3a9 100644 (file)
@@ -576,7 +576,7 @@ static struct attribute *lpss_attrs[] = {
        NULL,
 };
 
-static struct attribute_group lpss_attr_group = {
+static const struct attribute_group lpss_attr_group = {
        .attrs = lpss_attrs,
        .name = "lpss_ltr",
 };