summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2024-07-06 13:13:42 +0200
committerMark Brown <broonie@kernel.org>2024-07-08 12:50:16 +0100
commitf21711bbdbf0d95a389bfaad54ce444b46830d58 (patch)
treeb33b42fce3004b4633f9443e37473adb0094f33e /drivers/base
parent0f02ba48cdaf482d6756515e6936c1e23a316eac (diff)
downloadlinux-f21711bbdbf0d95a389bfaad54ce444b46830d58.tar.gz
linux-f21711bbdbf0d95a389bfaad54ce444b46830d58.tar.bz2
linux-f21711bbdbf0d95a389bfaad54ce444b46830d58.zip
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 'drivers/base')
-rw-r--r--drivers/base/regmap/regmap-irq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 45fd13ef13fc..d3ec1345b5b5 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -305,8 +305,8 @@ static inline int read_sub_irq_data(struct regmap_irq_chip_data *data,
unsigned int b)
{
const struct regmap_irq_chip *chip = data->chip;
+ const struct regmap_irq_sub_irq_map *subreg;
struct regmap *map = data->map;
- struct regmap_irq_sub_irq_map *subreg;
unsigned int reg;
int i, ret = 0;