Commit ce7bdb95 authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Linus Walleij

pinctrl: bcm: ns: Use uintptr_t for casting data

Fix up a compiler error on 64bit architectures where pointers
and integers differ in size.
Suggested-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 4fe81669
......@@ -285,7 +285,7 @@ static int ns_pinctrl_probe(struct platform_device *pdev)
of_id = of_match_device(ns_pinctrl_of_match_table, dev);
if (!of_id)
return -EINVAL;
ns_pinctrl->chipset_flag = (unsigned int)of_id->data;
ns_pinctrl->chipset_flag = (uintptr_t)of_id->data;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
"cru_gpio_control");
......@@ -307,7 +307,7 @@ static int ns_pinctrl_probe(struct platform_device *pdev)
for (i = 0, pin = (struct pinctrl_pin_desc *)&pctldesc->pins[0];
i < ARRAY_SIZE(ns_pinctrl_pins); i++) {
const struct pinctrl_pin_desc *src = &ns_pinctrl_pins[i];
unsigned int chipsets = (unsigned int)src->drv_data;
unsigned int chipsets = (uintptr_t)src->drv_data;
if (chipsets & ns_pinctrl->chipset_flag) {
memcpy(pin++, src, sizeof(*src));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment