Explorar o código

gpio: mvebu: fix warning when building on 64-bit

Casting a pointer to an int is not portable, and provokes a compiler
warning.  Cast to unsigned long instead to avoid the warning.

drivers/gpio/gpio-mvebu.c: In function 'mvebu_gpio_probe':
drivers/gpio/gpio-mvebu.c:662:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   soc_variant = (int) match->data;
                 ^

This will be needed when building gpio-mvebu for Armada 7k/8k ARM64
SoCs.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Russell King %!s(int64=8) %!d(string=hai) anos
pai
achega
f0d5046075
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/gpio/gpio-mvebu.c

+ 1 - 1
drivers/gpio/gpio-mvebu.c

@@ -659,7 +659,7 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
 
 
 	match = of_match_device(mvebu_gpio_of_match, &pdev->dev);
 	match = of_match_device(mvebu_gpio_of_match, &pdev->dev);
 	if (match)
 	if (match)
-		soc_variant = (int) match->data;
+		soc_variant = (unsigned long) match->data;
 	else
 	else
 		soc_variant = MVEBU_GPIO_SOC_VARIANT_ORION;
 		soc_variant = MVEBU_GPIO_SOC_VARIANT_ORION;