mirror of https://github.com/torvalds/linux.git
regulator: mt6358: Constify pointers to 'regulator_desc' wrap struct
Pointer to 'struct regulator_desc' is a pointer to const and the wrapping structure (container) is not being modified, thus entire syntax can be replaced to preferred and safer container_of_const(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://patch.msgid.link/20251126-container-of-const-regulator-v1-6-eeec378144d4@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
50011cacae
commit
438e90a287
|
|
@ -31,7 +31,7 @@ struct mt6358_regulator_info {
|
|||
u32 modeset_mask;
|
||||
};
|
||||
|
||||
#define to_regulator_info(x) container_of((x), struct mt6358_regulator_info, desc)
|
||||
#define to_regulator_info(x) container_of_const((x), struct mt6358_regulator_info, desc)
|
||||
|
||||
#define MT6358_BUCK(match, vreg, supply, min, max, step, \
|
||||
vosel_mask, _da_vsel_reg, _da_vsel_mask, \
|
||||
|
|
|
|||
Loading…
Reference in New Issue