Skip to content

Commit aad6c58

Browse files
krzklag-linaro
authored andcommitted
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: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent b2ee6a3 commit aad6c58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mfd/lp87565.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static int lp87565_probe(struct i2c_client *client)
9292

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

9797
i2c_set_clientdata(client, lp87565);
9898

0 commit comments

Comments
 (0)