Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <krzysztof.kozlowski@linaro.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

authored by

Krzysztof Kozlowski and committed by
Bartosz Golaszewski
b7df0f34 a0e3b8e2

+1 -1
+1 -1
drivers/gpio/gpio-mxs.c
··· 271 271 port->id = of_alias_get_id(np, "gpio"); 272 272 if (port->id < 0) 273 273 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); 275 275 port->dev = &pdev->dev; 276 276 port->irq = platform_get_irq(pdev, 0); 277 277 if (port->irq < 0)