]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
hwmon: (tps23861) Constify struct regmap_config
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Tue, 2 Jul 2024 10:09:32 +0000 (12:09 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 2 Jul 2024 18:31:30 +0000 (11:31 -0700)
`tps23861_regmap_config` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240702-hwmon-const-regmap-v1-3-63f6d4765fe0@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/tps23861.c

index d33ecbac00d6d91e8a4d429739560056ff75ff37..dfcfb09d9f3cdf3a7f133b49742fdf6d3db6ba73 100644 (file)
@@ -117,7 +117,7 @@ struct tps23861_data {
        struct dentry *debugfs_dir;
 };
 
-static struct regmap_config tps23861_regmap_config = {
+static const struct regmap_config tps23861_regmap_config = {
        .reg_bits = 8,
        .val_bits = 8,
        .max_register = 0x6f,