char: tlclk: constify attribute_group structures.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Wed, 2 Aug 2017 11:19:05 +0000 (16:49 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 15:15:16 +0000 (17:15 +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/char/tlclk.c

index 572a51704e67cf118692346f6c7cf78a9a3bf83c..6210bff46341e88b2eb2b19028f41004849cf2bc 100644 (file)
@@ -766,7 +766,7 @@ static struct attribute *tlclk_sysfs_entries[] = {
        NULL
 };
 
-static struct attribute_group tlclk_attribute_group = {
+static const struct attribute_group tlclk_attribute_group = {
        .name = NULL,           /* put in device directory */
        .attrs = tlclk_sysfs_entries,
 };