summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2018-05-03 14:46:24 +0200
committerLinus Walleij <linus.walleij@linaro.org>2018-05-16 14:35:24 +0200
commit668f06579e99762ec6ef4a97ba824bc812a9ab2f (patch)
tree2fa597f48cc8c47212bfaaf39f078a378cbc2bcc /drivers/gpio
parentba3efdff2cd214e4133b73f4891f6255b610c19b (diff)
gpio: ge: Fix build warning
Casting a pointer to u16 can produce a compiler warning such as this: drivers/gpio/gpio-ge.c: In function 'gef_gpio_probe': drivers/gpio/gpio-ge.c:83:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] gc->ngpio = (u16)of_device_get_match_data(&pdev->dev); ^ Cast the pointer through a uintptr_t to avoid the warning. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-ge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-ge.c b/drivers/gpio/gpio-ge.c
index 4c43562434cf..636952769bc8 100644
--- a/drivers/gpio/gpio-ge.c
+++ b/drivers/gpio/gpio-ge.c
@@ -80,7 +80,7 @@ static int __init gef_gpio_probe(struct platform_device *pdev)
}
gc->base = -1;
- gc->ngpio = (u16)of_device_get_match_data(&pdev->dev);
+ gc->ngpio = (u16)(uintptr_t)of_device_get_match_data(&pdev->dev);
gc->of_gpio_n_cells = 2;
gc->of_node = pdev->dev.of_node;