]> git.hungrycats.org Git - linux/commitdiff
usb: renesas_usbhs: fix build warning if 64-bit architecture
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tue, 29 Sep 2015 09:21:18 +0000 (18:21 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Feb 2017 08:43:05 +0000 (09:43 +0100)
commit 9ae7ce00cc1353155b1914bfc40e8362efef7d1c upstream.

This patch fixes the following warning if 64-bit architecture environment:

./drivers/usb/renesas_usbhs/common.c:496:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  dparam->type = of_id ? (u32)of_id->data : 0;

Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/renesas_usbhs/common.c
include/linux/usb/renesas_usbhs.h

index b3b6813ab270c046f9cf70ab99aa11821e2a7b0b..d51f47892386b303e1d2a39a895f4b290a38b381 100644 (file)
@@ -466,7 +466,7 @@ static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev)
                return NULL;
 
        dparam = &info->driver_param;
-       dparam->type = of_id ? (u32)of_id->data : 0;
+       dparam->type = of_id ? (uintptr_t)of_id->data : 0;
        if (!of_property_read_u32(dev->of_node, "renesas,buswait", &tmp))
                dparam->buswait_bwait = tmp;
        gpio = of_get_named_gpio_flags(dev->of_node, "renesas,enable-gpio", 0,
index d5952bb66752ec88c95dca1412b94fe9ef0ed135..c1209d5b853104ead3ffc5535c5662200695dbed 100644 (file)
@@ -153,7 +153,7 @@ struct renesas_usbhs_driver_param {
         */
        int pio_dma_border; /* default is 64byte */
 
-       u32 type;
+       uintptr_t type;
        u32 enable_gpio;
 
        /*