Skip to content

Commit 4bc82dd

Browse files
javiercarrascocruzgroeck
authored andcommitted
hwmon: (tmp513) Constify struct regmap_config
`tmp51x_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-2-63f6d4765fe0@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent 9d047eb commit 4bc82dd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hwmon/tmp513.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static const u8 TMP51X_CURR_INPUT[2] = {
159159
TMP51X_BUS_CURRENT_RESULT
160160
};
161161

162-
static struct regmap_config tmp51x_regmap_config = {
162+
static const struct regmap_config tmp51x_regmap_config = {
163163
.reg_bits = 8,
164164
.val_bits = 16,
165165
.max_register = TMP51X_MAX_REGISTER_ADDR,

0 commit comments

Comments
 (0)