afaed68d055c5427838c52ff06ea2c091e0a4f04
[openwrt/staging/dangole.git] /
1 From ce7bdb957b8e3f1cbf0a3358f1deef385dff6502 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Thu, 11 Oct 2018 13:23:40 +0200
4 Subject: [PATCH] pinctrl: bcm: ns: Use uintptr_t for casting data
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Fix up a compiler error on 64bit architectures where pointers
10 and integers differ in size.
11
12 Suggested-by: Arnd Bergmann <arnd@arndb.de>
13 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
14 Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
15 ---
16 drivers/pinctrl/bcm/pinctrl-ns.c | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
19 --- a/drivers/pinctrl/bcm/pinctrl-ns.c
20 +++ b/drivers/pinctrl/bcm/pinctrl-ns.c
21 @@ -285,7 +285,7 @@ static int ns_pinctrl_probe(struct platf
22 of_id = of_match_device(ns_pinctrl_of_match_table, dev);
23 if (!of_id)
24 return -EINVAL;
25 - ns_pinctrl->chipset_flag = (unsigned int)of_id->data;
26 + ns_pinctrl->chipset_flag = (uintptr_t)of_id->data;
27
28 res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
29 "cru_gpio_control");
30 @@ -307,7 +307,7 @@ static int ns_pinctrl_probe(struct platf
31 for (i = 0, pin = (struct pinctrl_pin_desc *)&pctldesc->pins[0];
32 i < ARRAY_SIZE(ns_pinctrl_pins); i++) {
33 const struct pinctrl_pin_desc *src = &ns_pinctrl_pins[i];
34 - unsigned int chipsets = (unsigned int)src->drv_data;
35 + unsigned int chipsets = (uintptr_t)src->drv_data;
36
37 if (chipsets & ns_pinctrl->chipset_flag) {
38 memcpy(pin++, src, sizeof(*src));