Skip to content
Snippets Groups Projects
Commit 92693b5a authored by Philipp Tomsich's avatar Philipp Tomsich Committed by Simon Glass
Browse files

usb: dwc2-otg: make regs_otg (in platdata) a uintptr_t


The regs_otg field in uintptr_t of the platform data structure for
dwc2-otg has thus far been an unsigned int, but will eventually be
casted into a void*.

This raises the following error with GCC 6.3 and buildman:
  ../drivers/usb/gadget/dwc2_udc_otg.c: In function 'dwc2_udc_probe':
  ../drivers/usb/gadget/dwc2_udc_otg.c:821:8: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    reg = (struct dwc2_usbotg_reg *)pdata->regs_otg;
          ^

This changes regs_otg to a uintptr_t to ensure that it is large enough
to hold any valid pointer (and fix the associated warning).

Signed-off-by: default avatarPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
parent 5a403a27
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ struct dwc2_plat_otg_data { ...@@ -16,7 +16,7 @@ struct dwc2_plat_otg_data {
int phy_of_node; int phy_of_node;
int (*phy_control)(int on); int (*phy_control)(int on);
unsigned int regs_phy; unsigned int regs_phy;
unsigned int regs_otg; uintptr_t regs_otg;
unsigned int usb_phy_ctrl; unsigned int usb_phy_ctrl;
unsigned int usb_flags; unsigned int usb_flags;
unsigned int usb_gusbcfg; unsigned int usb_gusbcfg;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment