Skip to content

Commit b1da996

Browse files
krzklag-linaro
authored andcommitted
mfd: max77541: Fix Wvoid-pointer-to-enum-cast warning
'id' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: max77541.c:176:18: error: cast to smaller integer type 'enum max7754x_ids' 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 0f28379 commit b1da996

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mfd/max77541.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ static int max77541_probe(struct i2c_client *client)
173173
i2c_set_clientdata(client, max77541);
174174
max77541->i2c = client;
175175

176-
max77541->id = (enum max7754x_ids)device_get_match_data(dev);
176+
max77541->id = (uintptr_t)device_get_match_data(dev);
177177
if (!max77541->id)
178178
max77541->id = (enum max7754x_ids)id->driver_data;
179179

0 commit comments

Comments
 (0)