Commit d35f2cfa5bf4b1fa6cb05614e53b4efc21095ec9

Authored by Vignesh Raghavendra
Committed by Lokesh Vutla
1 parent cab4e275dd

phy: omap-usb2-phy: Fix warnings when built for ARM64

Below warning is seen when this driver is built for devices with 64 bit
physical address space.

drivers/phy/omap-usb2-phy.c: In function ‘omap_usb2_phy_probe’:
drivers/phy/omap-usb2-phy.c:187:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   priv->phy_base = (void *)base;
                    ^
Fix this by using dev_read_addr_ptr() instead of dev_read_addr().

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>

Showing 1 changed file with 2 additions and 3 deletions Side-by-side Diff

drivers/phy/omap-usb2-phy.c
... ... @@ -179,11 +179,10 @@
179 179 return -EINVAL;
180 180  
181 181 if (data->flags & OMAP_USB2_CALIBRATE_FALSE_DISCONNECT) {
182   - u32 base = dev_read_addr(dev);
  182 + priv->phy_base = dev_read_addr_ptr(dev);
183 183  
184   - if (base == FDT_ADDR_T_NONE)
  184 + if (!priv->phy_base)
185 185 return -EINVAL;
186   - priv->phy_base = (void *)base;
187 186 priv->flags |= OMAP_USB2_CALIBRATE_FALSE_DISCONNECT;
188 187 }
189 188