summaryrefslogtreecommitdiff
path: root/include/usb
diff options
context:
space:
mode:
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-06-06 15:42:29 +0200
committerSimon Glass <sjg@chromium.org>2017-06-07 21:30:48 -0600
commit92693b5a4f8f70fcfa3630a00e3e714b5caf547c (patch)
treebb4fc944ab9e07a2ddb8c11ff64bd6a936386298 /include/usb
parent5a403a27b008430d4201bc6ce45c03843df933ee (diff)
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: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Diffstat (limited to 'include/usb')
-rw-r--r--include/usb/dwc2_udc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/usb/dwc2_udc.h b/include/usb/dwc2_udc.h
index 7324d8a62d..1a370e0e86 100644
--- a/include/usb/dwc2_udc.h
+++ b/include/usb/dwc2_udc.h
@@ -16,7 +16,7 @@ struct dwc2_plat_otg_data {
int phy_of_node;
int (*phy_control)(int on);
unsigned int regs_phy;
- unsigned int regs_otg;
+ uintptr_t regs_otg;
unsigned int usb_phy_ctrl;
unsigned int usb_flags;
unsigned int usb_gusbcfg;