Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Javier Carrasco and committed by
Guenter Roeck
0811b8b0 99bf7c2e

+1 -1
+1 -1
drivers/hwmon/gsc-hwmon.c
··· 39 39 struct hwmon_chip_info chip; 40 40 }; 41 41 42 - static struct regmap_bus gsc_hwmon_regmap_bus = { 42 + static const struct regmap_bus gsc_hwmon_regmap_bus = { 43 43 .reg_read = gsc_read, 44 44 .reg_write = gsc_write, 45 45 };