Commit b1ef855
regmap: Simplify devres handling
The resource-managed devm_regmap_init() can be a bit simpler by using
devm_add_action_or_reset() instead of devres_alloc(). This allows to
drop the less-obvious pointer to pointer (struct regmap **ptr) and make
devm_regmap_release() interface simpler.
Code is functionally equivalent with minor difference: devres_alloc()
will happen now after successful resource init (__regmap_init()).
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260305201349.32734-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent e7662bc commit b1ef855
1 file changed
Lines changed: 10 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1182 | 1182 | | |
1183 | 1183 | | |
1184 | 1184 | | |
1185 | | - | |
| 1185 | + | |
1186 | 1186 | | |
1187 | | - | |
| 1187 | + | |
1188 | 1188 | | |
1189 | 1189 | | |
1190 | 1190 | | |
| |||
1194 | 1194 | | |
1195 | 1195 | | |
1196 | 1196 | | |
1197 | | - | |
1198 | | - | |
1199 | | - | |
1200 | | - | |
1201 | | - | |
| 1197 | + | |
| 1198 | + | |
1202 | 1199 | | |
1203 | 1200 | | |
1204 | 1201 | | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
1210 | | - | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
1211 | 1208 | | |
1212 | 1209 | | |
1213 | 1210 | | |
| |||
0 commit comments