Skip to content

Commit 0f28379

Browse files
krzklag-linaro
authored andcommitted
mfd: max14577: Fix Wvoid-pointer-to-enum-cast warning
'dev_type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: max14577.c:406:5: error: cast to smaller integer type 'enum maxim_device_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Chanwoo Choi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 4db65f4 commit 0f28379

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/mfd/max14577.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,7 @@ static int max14577_i2c_probe(struct i2c_client *i2c)
402402

403403
of_id = of_match_device(max14577_dt_match, &i2c->dev);
404404
if (of_id)
405-
max14577->dev_type =
406-
(enum maxim_device_type)of_id->data;
405+
max14577->dev_type = (uintptr_t)of_id->data;
407406
} else {
408407
max14577->dev_type = id->driver_data;
409408
}

0 commit comments

Comments
 (0)