Skip to content

Commit 0f9440a

Browse files
krzkbroonie
authored andcommitted
spi: sc18is602: fix Wvoid-pointer-to-enum-cast warning
'id' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: spi-sc18is602.c:269:12: error: cast to smaller integer type 'enum chips' 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: Mark Brown <[email protected]>
1 parent ddaec4e commit 0f9440a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/spi/spi-sc18is602.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ static int sc18is602_probe(struct i2c_client *client)
266266
hw->ctrl = 0xff;
267267

268268
if (client->dev.of_node)
269-
hw->id = (enum chips)of_device_get_match_data(&client->dev);
269+
hw->id = (uintptr_t)of_device_get_match_data(&client->dev);
270270
else
271271
hw->id = id->driver_data;
272272

0 commit comments

Comments
 (0)