Skip to content

Commit 367124e

Browse files
krzklag-linaro
authored andcommitted
mfd: mxs-lradc: Fix Wvoid-pointer-to-enum-cast warning
'soc' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: mxs-lradc.c:145:15: error: cast to smaller integer type 'enum mxs_lradc_id' 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 4e57d14 commit 367124e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mfd/mxs-lradc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ static int mxs_lradc_probe(struct platform_device *pdev)
142142
if (!of_id)
143143
return -EINVAL;
144144

145-
lradc->soc = (enum mxs_lradc_id)of_id->data;
145+
lradc->soc = (uintptr_t)of_id->data;
146146

147147
lradc->clk = devm_clk_get(&pdev->dev, NULL);
148148
if (IS_ERR(lradc->clk)) {

0 commit comments

Comments
 (0)