Commit aad6c588 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Lee Jones
Browse files

mfd: lp87565: Fix Wvoid-pointer-to-enum-cast warning



'dev_type' is an enum, thus cast of pointer on 64-bit compile test with
W=1 causes:

  lp87565.c:95:23: error: cast to smaller integer type 'enum lp87565_device_type' 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/20230810095849.123321-5-krzysztof.kozlowski@linaro.org


Signed-off-by: default avatarLee Jones <lee@kernel.org>
parent b2ee6a37
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ static int lp87565_probe(struct i2c_client *client)

	of_id = of_match_device(of_lp87565_match_table, &client->dev);
	if (of_id)
		lp87565->dev_type = (enum lp87565_device_type)of_id->data;
		lp87565->dev_type = (uintptr_t)of_id->data;

	i2c_set_clientdata(client, lp87565);