]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
misc: lis3lv02d: constify attribute_group structures.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Fri, 4 Aug 2017 06:37:56 +0000 (12:07 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 14:55:48 +0000 (16:55 +0200)
attribute_group are not supposed to change at runtime. All functions
working with attribute_group 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/lis3lv02d/lis3lv02d.c

index e389b0b5278d56d238365ab5f7b8440105ec090f..8d53609861d86fb6d5afc9954764917d68c7c5ad 100644 (file)
@@ -856,7 +856,7 @@ static struct attribute *lis3lv02d_attributes[] = {
        NULL
 };
 
-static struct attribute_group lis3lv02d_attribute_group = {
+static const struct attribute_group lis3lv02d_attribute_group = {
        .attrs = lis3lv02d_attributes
 };