OSDN Git Service

gpio: mvebu: fix warning when building on 64-bit
authorRussell King <rmk+kernel@armlinux.org.uk>
Tue, 10 Jan 2017 22:53:28 +0000 (22:53 +0000)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 11 Jan 2017 15:47:04 +0000 (16:47 +0100)
commitf0d50460753d1444e681dc59352773f120846912
tree9f6d09f98c25a9493ff153486080441f14933536
parent054ccdef8b2850be3aee8cbd49000e6d61f837b2
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>
drivers/gpio/gpio-mvebu.c