Commit fddc9bb6 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mark Brown

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: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810111914.204847-1-krzysztof.kozlowski@linaro.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 55975401
...@@ -391,8 +391,7 @@ static int ltc3589_probe(struct i2c_client *client) ...@@ -391,8 +391,7 @@ static int ltc3589_probe(struct i2c_client *client)
i2c_set_clientdata(client, ltc3589); i2c_set_clientdata(client, ltc3589);
if (client->dev.of_node) if (client->dev.of_node)
ltc3589->variant = (enum ltc3589_variant) ltc3589->variant = (uintptr_t)of_device_get_match_data(&client->dev);
of_device_get_match_data(&client->dev);
else else
ltc3589->variant = id->driver_data; ltc3589->variant = id->driver_data;
ltc3589->dev = dev; ltc3589->dev = dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment