Skip to content

Commit b7df0f3

Browse files
krzkBartosz Golaszewski
authored andcommitted
gpio: mxs: fix Wvoid-pointer-to-enum-cast warning
'devid' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: gpio-mxs.c:274:16: error: cast to smaller integer type 'enum mxs_gpio_id' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent a0e3b8e commit b7df0f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpio/gpio-mxs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ static int mxs_gpio_probe(struct platform_device *pdev)
271271
port->id = of_alias_get_id(np, "gpio");
272272
if (port->id < 0)
273273
return port->id;
274-
port->devid = (enum mxs_gpio_id)of_device_get_match_data(&pdev->dev);
274+
port->devid = (uintptr_t)of_device_get_match_data(&pdev->dev);
275275
port->dev = &pdev->dev;
276276
port->irq = platform_get_irq(pdev, 0);
277277
if (port->irq < 0)

0 commit comments

Comments
 (0)