Unverified Commit 438e90a2 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mark Brown
Browse files

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: default avatarKrzysztof 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: default avatarMark Brown <broonie@kernel.org>
parent 50011cac
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,	\