diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2023-08-10 13:19:12 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-08-10 15:44:44 +0100 |
commit | fddc9bb6e277b99b0410410794d156e963aa8f0b (patch) | |
tree | 5d66d91c18ed88d7cb7e98bbbdc36b1f017cd9d8 | |
parent | 55975401fdf86ffe4736a557ae9d6f3d81ee5ba6 (diff) |
regulator: ltc3589: Fix Wvoid-pointer-to-enum-cast warning
'variant' is an enum, thus cast of pointer on 64-bit compile test with
W=1 causes:
ltc3589.c:394:22: error: cast to smaller integer type 'enum ltc3589_variant' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810111914.204847-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/regulator/ltc3589.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/regulator/ltc3589.c b/drivers/regulator/ltc3589.c index cf931b8c36dc..d892c2a5df7b 100644 --- a/drivers/regulator/ltc3589.c +++ b/drivers/regulator/ltc3589.c @@ -391,8 +391,7 @@ static int ltc3589_probe(struct i2c_client *client) i2c_set_clientdata(client, ltc3589); if (client->dev.of_node) - ltc3589->variant = (enum ltc3589_variant) - of_device_get_match_data(&client->dev); + ltc3589->variant = (uintptr_t)of_device_get_match_data(&client->dev); else ltc3589->variant = id->driver_data; ltc3589->dev = dev; |