summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2025-05-09 17:24:49 +0300
committerMark Brown <broonie@kernel.org>2025-05-10 17:58:04 +0300
commitd5cc09847fa0df4034076f884de5957ec816dc52 (patch)
tree9f5b221d84c8acc8374f365488ff9f6a648b39e4
parentf1471bc435afa31c8c0c58551922830dc8f4b06b (diff)
downloadlinux-d5cc09847fa0df4034076f884de5957ec816dc52.tar.xz
regulator: da9121: Fix Wvoid-pointer-to-enum-cast warning
'subvariant_id' is an enum, thus cast of pointer on 64-bit compile test with clang and W=1 causes: da9121-regulator.c:1132:24: error: cast to smaller integer type 'enum da9121_subvariant' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20250509142448.257199-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/regulator/da9121-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/da9121-regulator.c b/drivers/regulator/da9121-regulator.c
index 17527a3f53b4..ef161eb0ca27 100644
--- a/drivers/regulator/da9121-regulator.c
+++ b/drivers/regulator/da9121-regulator.c
@@ -1129,7 +1129,7 @@ static int da9121_i2c_probe(struct i2c_client *i2c)
}
chip->pdata = i2c->dev.platform_data;
- chip->subvariant_id = (enum da9121_subvariant)i2c_get_match_data(i2c);
+ chip->subvariant_id = (kernel_ulong_t)i2c_get_match_data(i2c);
ret = da9121_assign_chip_model(i2c, chip);
if (ret < 0)