hwmon: (gsc-hwmon) constify read-only struct regmap_bus
Subsystems (2)
PATCH 1/1 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 <[email protected]>
---
I missed this one when converting regmap_config to const. After this conversion, all read-only regmap_* structs in hwmon are declared as const.
--- drivers/hwmon/gsc-hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/gsc-hwmon.c +1 -1
@@ -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, };
---
base-commit: 0b58e108042b0ed28a71cd7edf5175999955b233
change-id: 20240705-hwmon-const-regmap-a1fef10fbd65
Best regards,
Signature · 1 line
Javier Carrasco <[email protected]>
Quoted 4 lines · Javier Carrasco
gsc_hwmon_regmap_busis not modified and can be declared as const to move its data to a read-only section.Signed-off-by Javier Carrasco <[email protected]>
Applied.
Thanks,
Guenter