summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>2024-07-05 20:27:28 +0200
committerGuenter Roeck <linux@roeck-us.net>2024-07-05 14:37:01 -0700
commit0811b8b03bb30b82c84283dde1ff697bc192abc0 (patch)
tree4a9383ad65c95dd6c55aecebe7ab126ec680281d
parent99bf7c2eccff82760fa23ce967cc67c8c219c6a6 (diff)
downloadlinux-stable-0811b8b03bb30b82c84283dde1ff697bc192abc0.tar.gz
linux-stable-0811b8b03bb30b82c84283dde1ff697bc192abc0.tar.bz2
linux-stable-0811b8b03bb30b82c84283dde1ff697bc192abc0.zip
hwmon: (gsc-hwmon) constify read-only struct regmap_bus
`gsc_hwmon_regmap_bus` 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/20240705-hwmon-const-regmap-v1-1-7cde543ba818@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--drivers/hwmon/gsc-hwmon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/gsc-hwmon.c b/drivers/hwmon/gsc-hwmon.c
index 0f2147699c91..cb2f01dc4326 100644
--- a/drivers/hwmon/gsc-hwmon.c
+++ b/drivers/hwmon/gsc-hwmon.c
@@ -39,7 +39,7 @@ struct gsc_hwmon_data {
struct hwmon_chip_info chip;
};
-static struct regmap_bus gsc_hwmon_regmap_bus = {
+static const struct regmap_bus gsc_hwmon_regmap_bus = {
.reg_read = gsc_read,
.reg_write = gsc_write,
};