Skip to content

Commit 4db65f4

Browse files
krzklag-linaro
authored andcommitted
mfd: stmpe: Fix Wvoid-pointer-to-enum-cast warning
'partnum' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: stmpe-i2c.c:90:13: error: cast to smaller integer type 'enum stmpe_partnum' 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 59cf381 commit 4db65f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mfd/stmpe-i2c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ stmpe_i2c_probe(struct i2c_client *i2c)
8787
dev_info(&i2c->dev, "matching on node name, compatible is preferred\n");
8888
partnum = id->driver_data;
8989
} else
90-
partnum = (enum stmpe_partnum)of_id->data;
90+
partnum = (uintptr_t)of_id->data;
9191

9292
return stmpe_probe(&i2c_ci, partnum);
9393
}

0 commit comments

Comments
 (0)