]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mfd: gateworks-gsc: Constify struct regmap_bus
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Thu, 4 Jul 2024 17:23:32 +0000 (19:23 +0200)
committerLee Jones <lee@kernel.org>
Fri, 30 Aug 2024 08:40:13 +0000 (09:40 +0100)
`gsc_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/20240704-mfd-const-regmap_config-v2-22-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/gateworks-gsc.c

index b02bfdc871e9ec3e92f07a3ac5185f2fdf325c0f..6ca867b8f5f1207723df9b98f18ee04aec7d5529 100644 (file)
@@ -160,7 +160,7 @@ static const struct of_device_id gsc_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, gsc_of_match);
 
-static struct regmap_bus gsc_regmap_bus = {
+static const struct regmap_bus gsc_regmap_bus = {
        .reg_read = gsc_read,
        .reg_write = gsc_write,
 };