Skip to content

Commit 5033fb9

Browse files
krzklag-linaro
authored andcommitted
mfd: wm8994: Fix Wvoid-pointer-to-enum-cast warning
'type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: wm8994-core.c:631:19: error: cast to smaller integer type 'enum wm8994_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski <[email protected]> Acked-by: Charles Keepax <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent a2ce000 commit 5033fb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mfd/wm8994-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ static int wm8994_i2c_probe(struct i2c_client *i2c)
628628
if (i2c->dev.of_node) {
629629
of_id = of_match_device(wm8994_of_match, &i2c->dev);
630630
if (of_id)
631-
wm8994->type = (enum wm8994_type)of_id->data;
631+
wm8994->type = (uintptr_t)of_id->data;
632632
} else {
633633
wm8994->type = id->driver_data;
634634
}

0 commit comments

Comments
 (0)