Skip to content

Commit a2ce000

Browse files
krzklag-linaro
authored andcommitted
mfd: tc3589: Fix Wvoid-pointer-to-enum-cast warning
'version' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: tc3589x.c:343:13: error: cast to smaller integer type 'enum tc3589x_version' 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 aad6c58 commit a2ce000

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mfd/tc3589x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ tc3589x_of_probe(struct device *dev, enum tc3589x_version *version)
340340
of_id = of_match_device(tc3589x_match, dev);
341341
if (!of_id)
342342
return ERR_PTR(-ENODEV);
343-
*version = (enum tc3589x_version) of_id->data;
343+
*version = (uintptr_t) of_id->data;
344344

345345
for_each_child_of_node(np, child) {
346346
if (of_device_is_compatible(child, "toshiba,tc3589x-gpio"))

0 commit comments

Comments
 (0)