diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2024-07-06 13:13:42 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-07-08 12:50:16 +0100 |
commit | f21711bbdbf0d95a389bfaad54ce444b46830d58 (patch) | |
tree | b33b42fce3004b4633f9443e37473adb0094f33e /include/linux/regmap.h | |
parent | 0f02ba48cdaf482d6756515e6936c1e23a316eac (diff) |
regmap-irq: handle const struct regmap_irq_sub_irq_map
The struct instances supplied by the drivers are never modified.
Handle them as const in the regmap core allowing the drivers to put them
into .rodata.
Also add a new entry to const_structs.checkpatch to make sure future
instances of this struct already enter the tree as const.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240706-regmap-const-structs-v1-2-d08c776da787@weissschuh.net
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r-- | include/linux/regmap.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index a6bc2980a98b..2da1cfc52233 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -1607,7 +1607,7 @@ struct regmap_irq_chip { unsigned int main_status; unsigned int num_main_status_bits; - struct regmap_irq_sub_irq_map *sub_reg_offsets; + const struct regmap_irq_sub_irq_map *sub_reg_offsets; int num_main_regs; unsigned int status_base; |