]> git.sur5r.net Git - u-boot/commitdiff
spi: fsl_qspi: fix compile warning for 64-bit platform
authorGong Qianyu <Qianyu.Gong@freescale.com>
Tue, 26 Jan 2016 07:06:39 +0000 (15:06 +0800)
committerYork Sun <york.sun@nxp.com>
Wed, 27 Jan 2016 16:27:49 +0000 (08:27 -0800)
This patch fixes the following compile warning:
drivers/spi/fsl_qspi.c: In function 'fsl_qspi_probe':
drivers/spi/fsl_qspi.c:937:15:
  warning: cast to pointer from integer of different size
 [-Wint-to-pointer-cast]
  priv->regs = (struct fsl_qspi_regs *)plat->reg_base;
               ^
Just make the cast explicit.

Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <york.sun@nxp.com>
drivers/spi/fsl_qspi.c

index 542b6cfe355b3e3212f7cb59d5c49792e1333e4c..38e5900dba84186cff95a03b387a169f690d357e 100644 (file)
@@ -936,7 +936,7 @@ static int fsl_qspi_probe(struct udevice *bus)
 
        dm_spi_bus->max_hz = plat->speed_hz;
 
-       priv->regs = (struct fsl_qspi_regs *)plat->reg_base;
+       priv->regs = (struct fsl_qspi_regs *)(uintptr_t)plat->reg_base;
        priv->flags = plat->flags;
 
        priv->speed_hz = plat->speed_hz;