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.
Showing the changes to scripts/const_structs.checkpatch (1 of 3 files). Show all
Unified · Split
| @@ -72,6 +72,7 @@ regmap_bus · 71 unmodified lines | |||
| 72 | regmap_config | 72 | regmap_config |
| 73 | regmap_irq | 73 | regmap_irq |
| 74 | regmap_irq_chip | 74 | regmap_irq_chip |
| 75 | regmap_irq_sub_irq_map | ||
| 75 | regmap_range | 76 | regmap_range |
| 76 | regmap_range_cfg | 77 | regmap_range_cfg |
| 77 | regulator_ops | 78 | regulator_ops |