diff mbox series

[3/3] hwmon: (tps23861) Constify struct regmap_config

Message ID 20240702-hwmon-const-regmap-v1-3-63f6d4765fe0@gmail.com (mailing list archive)
State Accepted
Headers show
Series hwmon: constify struct regmap_config | expand

Commit Message

Javier Carrasco July 2, 2024, 10:09 a.m. UTC
`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>
---
 drivers/hwmon/tps23861.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Guenter Roeck July 2, 2024, 6:31 p.m. UTC | #1
On Tue, Jul 02, 2024 at 12:09:32PM +0200, Javier Carrasco wrote:
> `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>

Applied.

Thanks,
Guenter
diff mbox series

Patch

diff --git a/drivers/hwmon/tps23861.c b/drivers/hwmon/tps23861.c
index d33ecbac00d6..dfcfb09d9f3c 100644
--- a/drivers/hwmon/tps23861.c
+++ b/drivers/hwmon/tps23861.c
@@ -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,